wxDialog with minimize/maximize button in linux

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
rajan_m
Knows some wx things
Knows some wx things
Posts: 39
Joined: Tue Jan 20, 2009 10:37 am
Location: chennai

wxDialog with minimize/maximize button in linux

Post by rajan_m »

Hi,

Is there a way to get wxDialog with minimize and maximize button?

i've gone through this http://forums.wxwidgets.org/viewtopic.p ... ize#p38790 ,
but i realy need to know whether its possible with dialog itself.

wxWidgets 2.8.10
RedHat enterprise client 5.6

Regards,
Rajan.M
Every exit is an entry somewhere else!
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxDialog with minimize/maximize button in linux

Post by DavidHart »

Hi,

Try using the style wxDEFAULT_DIALOG_STYLE | wxMAXIMIZE_BOX | wxRESIZE_BORDER. That works for me (debian, kde). And no, I don't know why the wxRESIZE_BORDER is needed.

Regards,

David
rajan_m
Knows some wx things
Knows some wx things
Posts: 39
Joined: Tue Jan 20, 2009 10:37 am
Location: chennai

Re: wxDialog with minimize/maximize button in linux

Post by rajan_m »

DavidHart wrote:Hi,

Try using the style wxDEFAULT_DIALOG_STYLE | wxMAXIMIZE_BOX | wxRESIZE_BORDER. That works for me (debian, kde). And no, I don't know why the wxRESIZE_BORDER is needed.
Thanks for your reply and its not working for me. using gnome version 2.16.0

tried

Code: Select all

: wxDialog( parent, id, title, pos, size,wxDEFAULT_DIALOG_STYLE | wxMAXIMIZE_BOX | wxRESIZE_BORDER)
Regards,
Rajan.M
Every exit is an entry somewhere else!
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxDialog with minimize/maximize button in linux

Post by DavidHart »

It looks as if it's a gnome issue. I tried running a dialog on FC15 (the oldest VirtualBox guest I have here) with wx2.8.12 and no buttons appear. On FC20 with wx3.0.0, again it fails with gnome. However exactly the same configuration of FC20 but with kde, the buttons appear, even with just wxDEFAULT_DIALOG_STYLE.

I don't think wx can (or should) interfere with a DE's setting; and even if you changed your local gnome configuration, you couldn't alter your users' ones. So if it's important enough to you, I suggest using a frame instead; perhaps wxMiniFrame.
modoran
Knows some wx things
Knows some wx things
Posts: 47
Joined: Tue Mar 23, 2010 1:31 pm
Location: Romania
Contact:

Re: wxDialog with minimize/maximize button in linux

Post by modoran »

The documentation for wxMiniFrame says that :
wxMINIMIZE_BOX:
Displays a minimize box on the frame (Windows and Motif only).
wxMAXIMIZE:
Displays the frame maximized (Windows only).
wxMAXIMIZE_BOX:
Displays a maximize box on the frame (Windows and Motif only).
So it is not a solution.
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxDialog with minimize/maximize button in linux

Post by DavidHart »

OK, but a wxFrame should work all right.
Post Reply