Opened 2 years ago

Last modified 2 years ago

#14730 new defect

Add a new wxMenuButton class

Reported by: vadz Owned by:
Priority: normal Milestone:
Component: GUI-all Version:
Keywords: gtk3 native Cc: pbfordev@…
Blocked By: Blocking:
Patch: no

Description

We support buttons with drop down menus in tool bars but we don't have a standalone control doing the same thing, yet it's often useful to have. A generic implementation of such control is mostly trivial, we just need to popup a menu when the button is clicked but now there is also a native control doing the same thing in GTK+ 3 so it would make sense to provide this in wxWidgets itself in order to allow using the native version if available.

Change History (3)

comment:1 follow-up: Changed 2 years ago by PB

  • Cc pbfordev@… added

I believe it would be great to have also a split button . A simple menu button shouldn't be difficult to do in the user code, a split button (also available on Vista as a native control, using BS_SPLIT flag) is not so easy.

comment:2 Changed 2 years ago by vadz

There is a rather subtle difference between menu buttons (also shown on the same MSDN page) and split buttons. I don't actually know if Windows provides native support for the menu buttons so from that point of view it would make sense to support split buttons as they're natively supported. But OTOH GTK+ control is clearly a menu button and not a split one. So perhaps we should have some style indicating whether the button has its own command or always pops up a menu and use different implementations depending on it. Or maybe we should just have 2 different classes, this would be probably simpler to implement.

comment:3 in reply to: ↑ 1 Changed 2 years ago by RedTide

Replying to PB:

I believe it would be great to have also a split button . A simple menu button shouldn't be difficult to do in the user code, a split button (also available on Vista as a native control, using BS_SPLIT flag) is not so easy.

See #12984

Note: See TracTickets for help on using tickets.