TabStop/TabIndex 在 TableLayoutPanel 中表现不稳定

发布于 2024-10-02 10:52:05 字数 586 浏览 3 评论 0原文

我有一个相当复杂的 TableLayoutPanel,上面有近 40 个控件。有些是只读的,有些不需要用户注意,除非在非常特殊的情况下(然后可以用鼠标访问)。因此,我想为这些控件设置 TabStop=false ,并按从上到下、从左到右的顺序排列其余控件。

但是,对于 TableLayoutPanel 内的任何控件,我无法更改 TabStop 属性。也就是说,我可以,但在下次重建时它会重置为 False。因此,所有控件都可以通过 TAB 键访问,甚至是那些我不想访问的控件。

这是怎么回事?

环境:Windows 7企业版; VS2008; .NET 3.5 SP1;所有控件都直接放置在TableLayouPanel上,没有中间容器。

添加了更多信息:罗伯特·科尔 (Robert Kerr) 报告说他无法复制。我忘了提及,我在 TableLayoutPanel 上专门使用了 Telerik Winforms RadControls。按钮/复选框似乎工作正常,而文本框、组合框和旋转编辑则不行。

I've got a rather complex TableLayoutPanel with close to 40 controls on it. Some are read-only, and some don't need user attention unless in very special cases (which can then be accessed with mouse). So I'd like to set TabStop=false to those controls, and arrange the rest in top-down left-to-right order.

However for any control inside the TableLayoutPanel I cannot change the TabStop property. That is, I can, but it gets reset to False upon the next rebuild. Consequently all controls can be reached by the TAB key, even the ones I don't want to be reachable.

What is going on here?

Environment: Windows 7 Enterprise; VS2008; .NET 3.5 SP1; All controls are placed directly on the TableLayouPanel, there are no intermediary containers.

Added more info: Robert Kerr reports that he is unable to reproduce. I forgot to mention that I used exclusively Telerik Winforms RadControls on the TableLayoutPanel. It also seems that buttons/checkboxes work fine, while textboxes, comboboxes and spinedits do not.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

归途 2024-10-09 10:52:05

需要更多信息。我无法重现该问题。创建一个 TableLayoutPanel,设置为 4 行、4 列,并随机填充按钮、文本框、单选控件、复选框。然后分别设置几个,Tabstop 为 False。反复重建并执行应用程序,它按预期工作。只有 Tabstop 为 True 的控件才能通过 Tab 键访问。 Tabstop 值从未重置为默认值 (true)。
(VS2008、.NET 3.5 SP1、WinSVR2003)

More info required. I was unable to duplicate the problem. Created a TableLayoutPanel, set to 4 rows, 4 columns, and randomly populated with Buttons, TextBoxes, RadioControls, CheckBoxes. Then set on a couple of each, Tabstop to False. Repeatedly rebuilt and executed the application and it worked as expected. Only the controls with True for Tabstop were reachable by tabbing. At no time did the Tabstop value reset to default (true).
(VS2008, .NET 3.5 SP1, WinSVR2003)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文