View Issue Details

IDProjectCategoryView StatusLast Update
0002425JEDI VCL04 Feature Requestpublic2005-05-19 08:19
ReporteranonymousAssigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionopen 
Product Version3.00 BETA 
Target VersionFixed in Version 
Summary0002425: Behaviour of Button with Action and DropDownMenu
DescriptionIf button (ie TJvImgBtn) has both Action and DropDownMenu property assigned and one clicks on the button then first action is executed and then dropdown menu is shown. Wouldn't it be more logical that when both of these are assigned then dropdown menu is shown only when user clicks on the "dropdown area" of the button (and of course action is not executed in this case)?
TagsNo tags attached.

Activities

user72

2004-12-23 00:48

  ~0005994

> Wouldn't it be more logical [...]
No. The entire button is the dropdown area: if you click it, the dropdown is shown. And how are we to know if the user doesn't want to perform an action before dropping down the menu? I can think of at least one application: creating the menu items dynamically when the button is clicked.

Also, the behavior is exactly the same as with a menu item that has subitems: if you select it (i.e click) the OnClick/OnExecute event for that menu item is triggered.

The logical solution is to not have an Action assigned if you have a dropdown menu and don't want anything to execute when you click the button.

anonymous

2004-12-23 04:55

viewer   ~0005996

IMO current implementation severely limits the use of the button - one is allowed to use it only as a plain button (action or OnClick executed when clicked) or as a kind of fancy menu (dropdown menu is shown). I want to have both of these features available at the same time - when button's "main area" is clicked then the default action (Action or OnClick) is executed but one can also select more specific action from dropdown menu (which requires clicking on the dropdown arrow to show menu).

Say your app is designed to enter orders. There is an "main" order form which is commonly used but occasionally some other form is used. So you have [Add order|v] button which launches the main form when clicked. But it also has a dropdown menu (which is shown only when clicking on "dropdown area") so user can select different order form when needed. Does it make sense to you?

user72

2004-12-23 06:58

  ~0005997

> Does it make sense to you?
Yes, but you have to understand that there is no dropdown area: when you click the button, the dropdown is called, regardless of where you click.

anonymous

2004-12-23 07:14

viewer   ~0005998

Yes, and this is my feature request - make it to have one (dropdown area). TJvImgBtn already has DropArrow property, perhaps it can be used: when it is FALSE then button works as it is, but when set to TRUE it works as I described. Button should then also have a separator line between dropdown area and button area (like ToolButton has). Detecting where user clicked should not be a problem but keyboard handling can be tricky...

user72

2004-12-26 14:30

  ~0006013

I've had a look at doing what you propose and I haven't been able to find a satisfactory solution that resolves all issues with painting, keyboard handling and focusing.

If someone else can come up with a solution, fine, but I am not able to.

obones

2005-05-19 08:19

administrator   ~0007250

Well, I'm closing this as no one found a solution and no one else complained about the current situation.

Issue History

Date Modified Username Field Change
2004-12-22 12:26 anonymous New Issue
2004-12-23 00:48 user72 Note Added: 0005994
2004-12-23 00:48 user72 Status new => feedback
2004-12-23 04:55 anonymous Note Added: 0005996
2004-12-23 06:58 user72 Note Added: 0005997
2004-12-23 07:14 anonymous Note Added: 0005998
2004-12-26 14:30 user72 Note Added: 0006013
2005-05-19 08:19 obones Status feedback => closed
2005-05-19 08:19 obones Note Added: 0007250