复选框标签中的一些字母被剪切

问题描述 投票:0回答:1

我在GMS 3.2.xx和GMS 3.5.xx中运行DLGCreateDialog的典型示例

TagGroup DLG, DLGItems
DLG = DLGCreateDialog( "Please enter strings", DLGItems )
TagGroup opt1tg = DLGCreateCheckBox( "Option 1", 0)
TagGroup opt2tg = DLGCreateCheckBox( "Option 2", 1)
TagGroup opt3tg = DLGCreateCheckBox( "Option 3", 1)
DLGitems.DLGAddElement( opt1tg )
DLGitems.DLGAddElement( opt2tg )
DLGitems.DLGAddElement( opt3tg )
if ( !Alloc( UIframe ).Init( DLG ).Pose() )
Throw( "User abort." )
Result( "Option 1: " + opt1tg.DLGGetValue() + "\n" )
Result( "Option 2: " + opt2tg.DLGGetValue() + "\n" )
Result( "Option 3: " + ( opt3tg.DLGGetValue() ? "enabled" : "disabled" ) + "\n" )

但是对话框只显示标签的前几个字母,例如“Optio...”。此代码可以在旧版 GMS 2.3.xxx 中完美运行。

enter image description here

我无法理解原因,也不知道解决方法。 :(

dm-script
1个回答
0
投票

在我的 3.5.3 安装(Windows7,英文操作系统)上运行脚本会给出: Dialog

但是,我确实注意到你的字体和我的不同。我可以假设这不是在英语操作系统上吗?看起来 Windows 默认字体不同,导致宽度计算失败。

您可以尝试在 Gatan 的问题跟踪器 网页上将此问题报告为问题,但我相信 DigitalMicrograph 指定了英语操作系统作为要求。因此它可能不会被视为高优先级项目。

作为“修复”:尝试使用

DLGInternalPadding()
人为地扩展字段。 我无法尝试这个 - 因为我没有遇到这个问题 - 但它会像这样工作:

TagGroup DLG, DLGItems
DLG = DLGCreateDialog( "Please enter strings", DLGItems )
TagGroup opt1tg = DLGCreateCheckBox( "Option 1", 0).DLGInternalPadding(20,0)
TagGroup opt2tg = DLGCreateCheckBox( "Option 2", 1).DLGInternalPadding(20,0)
TagGroup opt3tg = DLGCreateCheckBox( "Option 3", 1).DLGInternalPadding(20,0)
DLGitems.DLGAddElement( opt1tg )
DLGitems.DLGAddElement( opt2tg )
DLGitems.DLGAddElement( opt3tg )
if ( !Alloc( UIframe ).Init( DLG ).Pose() )
Throw( "User abort." )
Result( "Option 1: " + opt1tg.DLGGetValue() + "\n" )
Result( "Option 2: " + opt2tg.DLGGetValue() + "\n" )
Result( "Option 3: " + ( opt3tg.DLGGetValue() ? "enabled" : "disabled" ) + "\n" )
© www.soinside.com 2019 - 2024. All rights reserved.