Board index » delphi » This should be easy, but I found it difficult

This should be easy, but I found it difficult

Listen to what I need to do and I can't do (I did it, but with a complicated and imperfect solution):

I want a toolBar with, say, 2 buttons.
Each button, when clicked, hides its toolBar and displays a new toolBar with its buttons, one of which is the one that takes back to the previous toolBar. In other words:

TOOLBAR1     Btn1   Btn2

Clicking Btn1, TOOLBAR2 replaces TOOLBAR1:

TOOLBAR2     BtnA   BtnB   BtnC   BtnD

Clicking BtnA, TOOLBAR1 replaces TOOLBAR2.

To make it a bit more difficult, each Button should also have a DropDown Menu that gives access to the same functions accessed through the Toolbar.

This should be a very common requirement, so I guess there should be a very common solution, which I didn't find. Thats why I am asking help !

 

Re:This should be easy, but I found it difficult


Quote
Stark wrote:
> Listen to what I need to do and I can't do (I did it, but with
> a complicated and imperfect solution): I want a toolBar with,
> say, 2 buttons.Each button, when clicked, hides its toolBar
> and displays a new toolBar with its buttons, one of which is
> the one that takes back to the previous toolBar. In other
> words:

One way to do it:  put two toolbars on a panel, align both to
client.  Set visible to false on the bottom one.  In the button
click events do something like:

toolbar1.visible:=false;
toolbar2.visible:=true;

and vice versa in the other one.

--
Kent Briggs, kbri...@briggsoft.com
Briggs Softworks, http://www.briggsoft.com

Other Threads