[wxPython] Force minimum size on wxDialog with wxRESIZE_BORDER

Hi,

while trying to make my boa dialogs resizable, I wasn't able to
figure out, how to ensure a minimum size.

I've installed a EVT_SIZE handler on the dialog:

    def OnSize(self, event):
        if self.GetClientSizeTuple() >= self.MinSize:
            event.Skip()

but it isn't working as expected. One can happily resize it
below the min size. I also tried to call self.SetSize()
directly in a else clause, but that didn't helped either.

Any hint is greatly appreciated.

Cheers,
  Hans-Peter

Hello Hans-Peter,

Hans-Peter Jansen wrote:

Hi,

while trying to make my boa dialogs resizable, I wasn't able to
figure out, how to ensure a minimum size.

Set the SizeHints property in the Inspector.

It's a tuple of 4 values: (minX, minY, maxX, maxY)

Riaan.

Hi Riaan,

> while trying to make my boa dialogs resizable, I wasn't able to
> figure out, how to ensure a minimum size.

Set the SizeHints property in the Inspector.

It's a tuple of 4 values: (minX, minY, maxX, maxY)

Cool, thanks. Would you mind looking into the "constraint objects
move by one on edit in Designer" issue.

BTW: When using constraints together with wxNotebooks, it's
important, that the notebook panels are unconstraint. Otherwise
very strange things happens: some right/bottom constraint objects
get negative x position values and simply disappear. Just enable
constraints of panel[23] in my example. I've made it orginally to
resolve this issue ;).

Riaan.

Cheers,
  Hans-Peter