MS Access:为什么禁用文本框时标签格式会发生变化? [英] MS Access: Why does label formatting change when textbox is disabled?
问题描述
在 Microsoft Access 2013 中,如果应用了边距,我发现当关联的文本框被禁用时,标签格式会意外更改.
In Microsoft Access 2013, I find that label formatting changes unintentionally when the associated textbox is disabled, if a margin is applied.
要创建此问题:
- 在表单上放置一个文本框.自动关联标签出现.
- 选择标签并将其边距设置为零以外的任何值(设置例如,使用功能区将边距控制为 Medium.
- 选择文本框并将其 Enabled 属性更改为 No.
- 标签格式不正确.似乎存在未正确对齐的文本叠加层.
无论在设计时还是在运行时禁用文本框,格式都会发生变化.当文本框启用时它会恢复.
The format changes whether the textbox is disabled at design time or at runtime. It reverts back when the textbox is enabled.
这只是一个错误,还是有导致这种行为的设置?
Is this simply a bug, or are there settings which cause this behaviour?
我使用了以下解决方法;如果标签和文本框是控件表排列的一部分,则两者都不方便.
I have used the following workarounds; neither is handy if the label and textbox are part of a table arrangement of controls.
- 删除关联的标签,为文本框创建一个独立的标签.禁用文本框时,标签不会变灰.
- 调整标签大小,以便不需要边距.
推荐答案
表单上的 Enabled/Locked 控件有四种组合.您所追求的选项是禁用和锁定.标签或控件均未显示为灰色.
There's four combinations with the Enabled / Locked controls on a form. The option you're after is Disabled and Locked. Neither label or control is greyed out.
我在下面说明了您可以使用每种组合做什么:
I've illustrated below what you can do with each of the combinations:
这篇关于MS Access:为什么禁用文本框时标签格式会发生变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!