Alex,

Not clear whether you are using the popup command already, but if not, that might help. Using this you can test whatever you want before issuing the command that invokes the popup, something like (in a regular mouseup button, locked field etc.) :

if [condition_false] then
    exit to top
end if
popup btn "mypopupbutton" of cd 1 of stack "bla_bla_bla"
## I then routinely add:
if "Win32" is in the platform then then
    wait until the mouse is up with messages
end if
## because on windows the popup command may not pause the script

## the menupick handler itself goes in the popup btn not here

Martin Baxter

Alex Tweedly wrote:

This cannot be as hard as I'm making it ..... so I'll follow the excellent advice from the list of not struggling over a simple issue for more than an hour and ask for help. Though I am about 4 hours late .... :-(

Easy bit:
I want to have a button, that acts like a pop-up button - i.e. when I click on it, up pops a list of choices and I can select one - or I can click outside the list of options and get a "cancel" indication back. When a choice is made, I do the appropriate action. This is what I get with a "pop-up menu" selected from the IDE's tool palette.

Hard part:
Sometimes, there is only one valid choice; in that case, I'd like to go ahead with the appropriate action immediately - don't present a menu, just do the action.

I can put in a handler for the mouseDown to the pop-up button - but can't find a way to avoid it popping up.

I tried putting in another button, and having its mouseDown take the action - either just doing it, or sending mouseDown to the pop-up button - but apparently; sending a mouseDown isn't enough to trigger the pop-up.

(I tried a large number of other things, but I'm not going to embarrass myself by listing them all ....)

Am I just missing some easy way ?


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to