If you add the menu as a child of the label itself, then the menu might not show up at all because the label will measure the text that it holds and create a dimension that fits the text only.
如果您将菜单添加为标签的子元素,那么菜单根本就不会显示,因为标签将仅度量它所包含的文本,然后创建一个符合文本的大小。
Listing 1 shows how to create a simple text label.
清单1展示了如何创建一个简单的文本标签。
In the next row, enter the field label Topic, and then create a text field called Chat_Topic.
在下面一行中输入字段标题Topic,然后创建一个文本字段Chat _ Topic。
应用推荐