标签和按钮在Firemonkey中不使用标签
我想在 FMX 表单中使用选项卡。在 VCL 中,一切都按预期运行。在 FMX 中,我尝试了带有标签和按钮的选项卡,但没有成功。 HitTest
为 true,表单上没有其他控件。周围的框架不会出现,并且按 TAB 键不会执行任何操作。使用编辑字段它可以工作。我错过了什么吗?当前系统是Windows 11 Pro 21H2和Delphi 10.4.2。
I want to use tabs in a FMX form. In VCL all is functioning as expected. In FMX I tried tabs with labels and buttons without success. HitTest
is true, no other controls are on the form. The surrounding frame does not appear and pressing the TAB key does nothing. With edit fields it is working. Did I miss something? Current system is Windows 11 Pro 21H2 and Delphi 10.4.2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要标记为
tlabel
,请将其canfocus
属性设置为true
。由于此属性是公开的,但未发布,您需要在代码中执行此操作,例如在表单的ongreate
事件中或覆盖表单的加载
方法。To tab to a
TLabel
, set itsCanFocus
property toTrue
. As this property is public, not published, you'll need to do that in code, such as in the form'sOnCreate
event or by overriding the form'sLoaded
method.