menu buttons and showname

Peter Haworth pete at lcsql.com
Thu Jul 2 00:40:37 EDT 2015


This happens when the complete text of an option menu is empty, not when a
line of the text is empty.

On Wed, Jul 1, 2015, 8:23 PM  <dunbarx at aol.com> wrote:

>
> I am misunderstanding. In an option menu, if I have, say, the second line
> of the text of the button as empty, I get empty in the selected choice.
> This has nothing to do with the name of the button itself, which  does not
> show itself, nor the state of the show name.
>
>
> This is the behavior of an ordinary button, where if the label is not
> empty, then that label is shown as the "name" of the button, taking the
> place of the actual name.
>
>
> What am I missing?
>
>
> Craig
>
>
>
> -----Original Message-----
> From: Peter Haworth <pete at lcsql.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Sent: Wed, Jul 1, 2015 9:52 pm
> Subject: menu buttons and showname
>
>
> 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
> something.
>
> 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
> first
> time.
> _______________________________________________
> use-livecode mailing
> list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe,
> unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list