Johannes Weinert
2008-07-16 12:38:45 UTC
Hello,
In C++Builder 2007 with all patches applied I did the following:
- create a new VCL application
- drop a TToolBar, drop a TToolButton
- drop TActionList, drop TPopupMenu
- create Action1, Action2, Action3
- define OnExecute event functions for all Actions
- add Action2, Action3 to popup menu
- set TToolButton1.Style=tbsDropDown
- set TToolButton1.DropDownMenu=PopupMenu1
- set TToolButton1.Action = Action1
When the application is run the behavior is as desired, the tool button
fires Action1, I get a drop-down menu if I click on the down-arrow of
the tool button.
Now just one little change: In the constructor of the form set
ToolButton1->Action = Action3;
When the application is now run the tool button itself has no function
at all, only the drop-down menu is working.
I will post an example project into the attachment group.
Is this a bug or am I missing something? It seems the behavior is the
same in C++Builder 2006.
Thanks for an answer in advance,
Hans
In C++Builder 2007 with all patches applied I did the following:
- create a new VCL application
- drop a TToolBar, drop a TToolButton
- drop TActionList, drop TPopupMenu
- create Action1, Action2, Action3
- define OnExecute event functions for all Actions
- add Action2, Action3 to popup menu
- set TToolButton1.Style=tbsDropDown
- set TToolButton1.DropDownMenu=PopupMenu1
- set TToolButton1.Action = Action1
When the application is run the behavior is as desired, the tool button
fires Action1, I get a drop-down menu if I click on the down-arrow of
the tool button.
Now just one little change: In the constructor of the form set
ToolButton1->Action = Action3;
When the application is now run the tool button itself has no function
at all, only the drop-down menu is working.
I will post an example project into the attachment group.
Is this a bug or am I missing something? It seems the behavior is the
same in C++Builder 2006.
Thanks for an answer in advance,
Hans