groupbox焦点问题

buyaowen 2006-07-03 01:33:45
我在一个groupbox里面放了两个button,请问有没有属性让一个button的焦点失去后焦点落到另一个上,我现在把两个button的tabstop都设成了true,但是不好使。是不是微软就是设计成一个groupbox里面的组件只能获得一次焦点啊?
...全文
114 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
cmutex 2006-07-20
  • 打赏
  • 举报
回复
this.rdbAfter.TabIndex = 10;
修改为2
buyaowen 2006-07-07
  • 打赏
  • 举报
回复
up
buyaowen 2006-07-03
  • 打赏
  • 举报
回复
这是代码:
还有那个SetFouce是哪里的?没找到这个属性啊 //
// groupBox1
//
this.groupBox1.Controls.Add(this.rdbAfter);
this.groupBox1.Controls.Add(this.rdbBefore);
this.groupBox1.Location = new System.Drawing.Point(40, 96);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(112, 88);
this.groupBox1.TabIndex = 906;
this.groupBox1.TabStop = false;
//
// rdbBefore
//
this.rdbBefore.Checked = true;
this.rdbBefore.Font = new System.Drawing.Font("MS ゴシック", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(128)));
this.rdbBefore.ForeColor = System.Drawing.Color.Black;
this.rdbBefore.Location = new System.Drawing.Point(8, 15);
this.rdbBefore.Name = "rdbBefore";
this.rdbBefore.Size = new System.Drawing.Size(104, 32);
this.rdbBefore.TabIndex = 1;
this.rdbBefore.TabStop = true;
this.rdbBefore.Text = "前";
//
// rdbAfter
//
this.rdbAfter.Font = new System.Drawing.Font("MS ゴシック", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(128)));
this.rdbAfter.ForeColor = System.Drawing.Color.Black;
this.rdbAfter.Location = new System.Drawing.Point(8, 56);
this.rdbAfter.Name = "rdbAfter";
this.rdbAfter.TabIndex = 10;
this.rdbAfter.TabStop = true;
this.rdbAfter.Text = "后";

wcmj 2006-07-03
  • 打赏
  • 举报
回复
tabIndex你怎么设的?
两个按钮的数字相连试下
playwarcraft 2006-07-03
  • 打赏
  • 举报
回复
試試用SetFouce行不行?

110,561

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧