menu buttons and showname
pete at lcsql.com
Thu Jul 2 03:52:11 CEST 2015
I've struggled with using the showName property of a menu button pretty
much ever since I started using LC and beginning to wonder if I'm missing
The showName property needs to be true for the the user's selected choice
from, for example, an option menu to be displayed. First problem - that's
the label not the name. But if the text of the menu happens to be empty,
its name is displayed instead of empty which normally isn't something you
want to happen.
The dictionary says "If the object
<https://inbox.google.com/u/1/glossary/o/329.xml> has a *label* property
<https://inbox.google.com/u/1/glossary/p/391.xml>, the label
<https://inbox.google.com/u/1/dictionary/property/2173.xml> is displayed
instead of the name." but I have not found that to be the case. If a menu
button has non-empty text and label and you set the text to empty, its name
is displayed, not the label.
A good number of my menus are populated in a mouseDown handler with dynamic
content which may be empty. My workaround has been to check for empty and
either set the button text to space, or set the showName property to false
and be sure to set it to true in the menu's menuPick handler.
This isn't a huge deal but am I missing something obvious? Wouldn't be the
More information about the use-livecode