Is there a wxWindows control like this?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Is there a wxWindows control like this?

Post by ONEEYEMAN »

Hi, ALL,
Is there a wxWindows control like this:

Motif Option Menu Widget Or maybe somebody tells me how I could use something like this in my wxWindows program?

I don't want to port it back to Linux? :D

Thank you in advance.
benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Post by benedicte »

I also need something like this (for displaying a text menu-like widget).

The only "hack" I found was to display an icon, and handling the click event on it to display my menu manually.
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon »

Why not just open up a small dialog (wxMiniFrame) at the position of the mouse pointer?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN »

Why not just open up a small dialog (wxMiniFrame) at the position of the mouse pointer?
And why should I do this on Linux with OpenMotif installed?

Thank you.
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon »

Because it will work on all supported platforms.

Yes, the titlebar will only be smaller on MSW and GTK, but it will still WORK AS INTENDED on all platforms. Also you didn't mention wich platform you were developing for.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN »

Thank you for reply.
OK, this is my mistake, I should've specify it directly, not indirectly.
I don't want to port it back to Linux?
Now, how I will use such control? Should I use one from Motif? Or there is one in wxWindows?
If it's not part of wxWindows, I am perfectly fine with doing it on Linux, and using the codeguru code on Windows....
Also, maybe the Motif control already doing this. I am just guessing about that, because I looked at the CodeGuru code....

Thank you.
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon »

If you want to use a feature of a specific platform not present in wx, you can simply do a:

Code: Select all

#ifdef YOUR_PLATFORM
  // your platform's code
#elseifdef ANOTHER_PLATFORM
  // another platform's code
#else
  // general wx implementation
#endif
Depending on how important this speciffic feature is to you, this might be a good solution. My personal opinion is that this is far too much trouble, so I would stick with one single pure wx implementation.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN »

OK, thank you, geon.
I guess I am gonna stuck with you recommendation about wxMiniFrame...

Thank you.
Post Reply