TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: HelpLispinSeattle on April 20, 2009, 02:59:20 PM

Title: Trying to create a Pop-Up toolbar
Post by: HelpLispinSeattle on April 20, 2009, 02:59:20 PM
Hi there,

Is there a way for visual lisp to know the name of the toolbar
whose button you've just selected. I've been looking at "reactors"
but I dont think it has one for the toolbar selection.

I've created a toolbar called Pop-Up. I plan to "show" or Pop-up the toolbar
with this expression..
(command "-toolbar" "POP-UP" "f" (strcat x "," y) noofrows)

x and y......will be coordinates of cursor (results from a sub-routine)
noofrows.....will be number of rows

Now I will dropping & dragging different buttons from different toolbars, the ones
I use the most .  But I have to add this to each button I add..(command "-toolbar" "POP-UP" "h")

Is there a way wherein I dont have to add this to each button I add. I would
like the program to close a toolbar named "POP-UP" every time one of its buttons
is selected.

Any help would be appreciated.
Title: Re: Trying to create a Pop-Up toolbar
Post by: TimSpangler on April 20, 2009, 03:29:50 PM
Careful with reactors,  you can not use "command" or "vl-cmdf" inside of a reactor.
Title: Re: Trying to create a Pop-Up toolbar
Post by: HelpLispinSeattle on April 20, 2009, 03:33:35 PM
Tim,

Hmm, So I guest I cant use reactors...I'll wait for more suggestions or comments.
Title: Re: Trying to create a Pop-Up toolbar
Post by: GDF on April 20, 2009, 03:42:47 PM
Maybe something like this...

http://www.theswamp.org/index.php?topic=8451.0
Title: Re: Trying to create a Pop-Up toolbar
Post by: HelpLispinSeattle on April 20, 2009, 03:58:32 PM
Gary,

Its not really what I'm looking for but it sure gives me ideas/projects that I may work on..Thanks.
Title: Re: Trying to create a Pop-Up toolbar
Post by: T.Willey on April 20, 2009, 04:03:02 PM
This might provide some help/ideas.

[ http://www.theswamp.org/index.php?topic=10611.0;all ]
Title: Re: Trying to create a Pop-Up toolbar
Post by: HelpLispinSeattle on April 20, 2009, 04:17:07 PM
Tim,

Thank you! This looks interesting.