Board index » delphi » ToolButton

ToolButton


2003-09-09 02:20:32 PM
delphi238
How do I make the dropdown meun opens whenever I move the mouse over the
ToolButton ?
I tried the CheckMenuDropdown method but it only opened the first toolbutton
that I made mouse over. When I move the mouse to another tool button it did
not open its dropdown menu.
 
 

Re:ToolButton

"Alan" <XXXX@XXXXX.COM>writes:
Quote
How do I make the dropdown meun opens whenever I move the mouse over the
ToolButton ?

I tried the CheckMenuDropdown method but it only opened the first toolbutton
that I made mouse over. When I move the mouse to another tool button it did
not open its dropdown menu.
That makes sense. And it is probably why you don't want to do this<g>.
Showing a hint window is one thing, but activating a menu is something
else. Here's another problems that would arise.
- I open a main menu item (like my File menu) and as I move the mouse
to the item I want to select, it crosses your ToolButton. Poof - my
File menu is gone.
You really need to limit your actions in such situations to very
passive windows like hints or tooltips. Opening a menu is a very
active operation and takes control away from the control which was
previously active.
Good luck.
Kurt
 

Re:ToolButton

If there is no way to get around that, I only can accept that it is.
In addition, can I change the colour of the popup menu from gray to say
moneygreen, blue..
"Kurt Barthelmess (TeamB)" <XXXX@XXXXX.COM>writes
Quote
"Alan" <XXXX@XXXXX.COM>writes:

>How do I make the dropdown meun opens whenever I move the mouse over the
>ToolButton ?
>
>I tried the CheckMenuDropdown method but it only opened the first
toolbutton
>that I made mouse over. When I move the mouse to another tool button it
did
>not open its dropdown menu.

That makes sense. And it is probably why you don't want to do this<g>.
Showing a hint window is one thing, but activating a menu is something
else. Here's another problems that would arise.

- I open a main menu item (like my File menu) and as I move the mouse
to the item I want to select, it crosses your ToolButton. Poof - my
File menu is gone.

You really need to limit your actions in such situations to very
passive windows like hints or tooltips. Opening a menu is a very
active operation and takes control away from the control which was
previously active.

Good luck.

Kurt

 

Re:ToolButton

"Alan" <XXXX@XXXXX.COM>writes:
Quote
In addition, can I change the colour of the popup menu from gray to say
moneygreen, blue..
The default menu coloration is selected by the user in ControlPanel.
You can override that by making the menu owner-draw and drawing each
item in any color scheme you prefer.
Good luck.
Kurt