Author Topic: [wxSmith] Add size setting of a frame  (Read 5264 times)

Offline SamT

  • Multiple posting newcomer
  • *
  • Posts: 41
[wxSmith] Add size setting of a frame
« on: April 11, 2007, 05:09:48 am »
Hi Byo,

Thanks for your wxSmith. It really helps me to deal with the frame design.
For the size setting of a frame, there is one for "SetClientSize", could you please consider to add extra two more size setting(SetMaxSize and SetMinSize) in the properity dialog of the frame design?

Note: I am using wxwidgets 2.8.3 but I don't know the function is exist in 2.6.3 or not.

wxWindow::SetMaxSize
void SetMaxSize(const wxSize& size)

Sets the maximum size of the window, to indicate to the sizer layout mechanism that this is the maximum possible size.

--------------------------------------------------------------------------------

wxWindow::SetMinSize
void SetMinSize(const wxSize& size)

Sets the minimum size of the window, to indicate to the sizer layout mechanism that this is the minimum required size. You may need to call this if you change the window size after construction and before adding to its parent sizer.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: [wxSmith] Add size setting of a frame
« Reply #1 on: April 11, 2007, 11:21:02 pm »
Implemented :) Min / max size is added for most of items. I've put it into the end of properties list.

First I thought that it will be quite simple but even with some complications it wasn't really hard ;)

Some problems still remain but I haven't fixed them because of lack of time. Generally Max size works fine, but Min size does not. It's somehow related to sizers and I'm not sure where's the problem (I tried few solutions but even when min size is setup properly, window expands to it when resizing / moving window, not when it's initially shown). And you should not use dialog units for topmost items since it uses parent for calculations and parent may not always be given.

Regards
  BYO