OSX ToolBar tool with dropdown menu Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
xaviou
Super wx Problem Solver
Super wx Problem Solver
Posts: 437
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

OSX ToolBar tool with dropdown menu

Post by xaviou »

Hi.

I have a small application written with wx-3.1.1 that uses a classical toolbar (bitmaps only).
Tee first tool of this toolbar is for opening a datas file (showing an "Open File" dialog).

I've just added a "recents files list" to this application, with a dropdown menu on the right of this tool.
It works fine under Windows (I've not yet tested under Linux but I'm quite sure it will work) but it doesn't under OSX, as wxITEM_DROPDOWN isn't supported ( see here)

Is there a simple way to do this ?
I saw that wxAuiToolBar supports dropdown tools (tested with the wxAui sample), but I would like to avoid using this part of the framework just for a toolbar tool problem as it will make me rewrite the entire gui management part.

Thanks in advance for your answers.

Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: OSX ToolBar tool with dropdown menu

Post by ONEEYEMAN »

Hi,
Can you try to use wxComboBox?

Thank you.
User avatar
xaviou
Super wx Problem Solver
Super wx Problem Solver
Posts: 437
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: OSX ToolBar tool with dropdown menu

Post by xaviou »

Hi.
ONEEYEMAN wrote:Can you try to use wxComboBox?
Well, I don't think it will have a pretty look :(
The goal was just to have a dropdown menu with the recents files list, for a quick re-open.

I'll try to create my own control (a simple panel with 2 bitmaps buttons side by side) and add it to the toolbar with "AddControl" to see.

Thanks

Xav'
My wxWidgets stuff web page : X@v's wxStuff
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: OSX ToolBar tool with dropdown menu

Post by ONEEYEMAN »

xavious,
On top of that I don't think any of the usual native application have a toolbar with a tool for that.

The usual design is to have a menu for the recently used files, but it's of course up to the application {author}.

Thank you.
User avatar
xaviou
Super wx Problem Solver
Super wx Problem Solver
Posts: 437
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: OSX ToolBar tool with dropdown menu

Post by xaviou »

Hi
ONEEYEMAN wrote:xavious,
On top of that I don't think any of the usual native application have a toolbar with a tool for that.

The usual design is to have a menu for the recently used files, but it's of course up to the application {author}.
Yes, I know that. But this is a small application without any menu bar. So I just wanted to add a quick way to reopen files.

I've solved this problem by adding a second toolbar tool under OSX only, witch popup the recents files menu.

Regards

Xav'
My wxWidgets stuff web page : X@v's wxStuff
Post Reply