【发布时间】:2014-12-30 01:32:00
【问题描述】:
我有一个带有按钮和标签的 livecode 项目。当我重新调整窗口(堆栈)的大小时,我希望按钮和标签的宽度和高度发生变化。另外,我希望更改标签和按钮中文本的字体大小。我想随着字体大小的变化使文本的水平和垂直对齐居中。我尝试了这段代码,但文本超过了按钮/标签的高度(在更大的窗口大小中)。
set the width of field "label" to the width of this stack * 0.8
set the height of field "label" to the height of this stack * 0.2
set the textsize of field "label" to the height of field "label" - 10
set the textheight of field "label" to the height of field "label"
这正是我所期待的......
我怎样才能做到这一点?
【问题讨论】:
标签: height width livecode text-size