Using a field as a menu

J. Landman Gay jacque at hyperactivesw.com
Wed Feb 18 17:33:17 EST 2004


On 2/18/04 2:17 PM, Jim Carwardine wrote:

> I want to create a button that pulls down a menu of colour choices similar
> to what you might see in MS Word or Excel.  To do that, I've created a plain
> button that, when the mouse is down I show a field with several buttons
> displayed in front of it so the effect looks like a menu which the user then
> drags the mouse over the button showing the colour they want and select it.
> 
> The behaviour I want is to show the focus border as they drag across a
> colour button, then have the colour button accept the mouseUp and execute a
> colour change several text fields.  It seems as as though the first button
> keeps control of the mouse until the mouse button is released.  I seem to
> recall someone mentioning something similar to this but I can't find any
> references to it.  Has this been discussed or is there an easier way?  Jim

This is a good candidate for making a substack and popping it up with 
the "popup" command. You can put anything you want in the first card of 
the substack. Usually it is a bunch of buttons stacked in a column. I 
haven't tried using anything else (like color fields,) but in theory it 
should work. When you popup the substack, each line auto-hilites just 
like a menu does. You don't have to do anything special to get the effect.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list