Page 1 of 1

Small Dialogs

Posted: Sat Feb 13, 2016 5:57 pm
by evstevemd
Hi,
first let me put little disclaimer that am not sure if this is wxWidgets behaviour on Windows or wxCrafter issue.
I use wxC to generate dialogs which works fine in Linux. I have the size I put and works ok. In Windows however, every time they shrink to fit widgets populated in it.
If I put size it does not get honored so they look ugly under windows. Here is a simple example

Two are samples one in wxC and another in app

On wxC designer
true size.png
On real app
sample dialog.png
TIA,
S.

Re: Small Dialogs

Posted: Wed Feb 17, 2016 7:08 pm
by evstevemd
anyone in Windowsexperiencing the same issue?

Re: Small Dialogs

Posted: Thu Feb 18, 2016 12:49 am
by eranif
You need to set the minimum size for the dialog

Eran

Re: Small Dialogs

Posted: Thu Feb 18, 2016 11:56 pm
by evstevemd
Hi Eran,
I have tried that but it doesn't get honored. Sorry I did not mention that.

Sent from my TECNO H6 using Tapatalk

Re: Small Dialogs

Posted: Sat Feb 20, 2016 8:03 am
by eranif
Two things here:
1. wxCrafter calls GetSizer()->Fit() to ensure that all widgets are visible (hard coded dialog size is bad, especially when write cross platform application)
2. You can set a size to one of the internal widgets (e.g. a Notebook control) and the GetSizer()->Fit() will take this into account

Eran

Re: Small Dialogs

Posted: Sat Feb 20, 2016 10:01 am
by evstevemd
I will try to set Size of one widget and see what happens.
Thanks

Re: Small Dialogs

Posted: Sat Feb 20, 2016 12:46 pm
by evstevemd
So I found the issue. Its wxPersistence that was putting its size. I will have to disable it
Thanks.