【问题标题】:How do I get the width of the label text of a button?如何获取按钮标签文本的宽度?
【发布时间】:2013-07-19 14:44:34
【问题描述】:

如何将脚本中创建的按钮的宽度设置为其标签文本之一?

on createButtonWithLabel aLabel
   create button
   set the label of it to aLabel
   -- set the width of the button to the space used by 'aLabel'
   -- ??
end createButtonWithLabel

在 LiveCode 字典中搜索 width 会找到十几个条目,但似乎没有任何内容。

【问题讨论】:

    标签: button width livecode


    【解决方案1】:

    试试这个:

    将按钮“yourButton”的宽度设置为按钮“yourButton”的formattedWidth

    克雷格·纽曼

    【讨论】:

    • 完美运行!谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-12-31
    • 1970-01-01
    • 2015-11-22
    • 2020-05-29
    • 2016-10-31
    • 1970-01-01
    • 2014-11-15
    相关资源
    最近更新 更多