Search code examples
rubywxwidgetswxruby

How to set a minimum size for a Window in wxRuby


I'm doing a simple GUI using wxRuby. I have just only read the tutorials and FAQ on the official site of the gem, but there are just a few examples.

I want to know if there's a way (i'm sure there is a way but i don't know how to implement it) to set a minimum size of the windows...

For example, i want to set the minimum size of the windows to prevent the user from reducing the window to the level that the buttons and items aren't visible...

Thanks a lot.


Solution

  • Try Wx::Sizer.set_min_size(). As this is an abstract class, you need to use one of the sizers inheriting from it.