Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 wxRuby 做一个简单的 GUI。我只是阅读了 gem 官方网站上的教程和常见问题解答,但只有几个例子。
我想知道是否有办法(我确定有办法,但我不知道如何实现)来设置窗口的最小尺寸......
例如,我想设置窗口的最小尺寸,以防止用户将窗口缩小到按钮和项目不可见的水平......
非常感谢。
试试Wx::Sizer.set_min_size()。由于这是一个抽象类,您需要使用其中一个继承自它的 sizer。
检查这个:
http://wxruby.rubyforge.org/doc/window.html
和这个:
http://wxruby.rubyforge.org/doc/sizer.html