开发者

In Gtk, how can I dynamically set a Window's height and width?

开发者 https://www.devze.com 2022-12-19 23:30 出处:网络
Before you set Visible to true, you can use DefaultWidth and DefaultHeight. But these don\'t work once the Window is visible. You can use WidthRequest and HeightRequest, but these prevent the user fro

Before you set Visible to true, you can use DefaultWidth and DefaultHeight. But these don't work once the Window is visible. You can use WidthRequest and HeightRequest, but these prevent the user from shrinking the Window below the dimensions you set.

Is there any way to manually change the dimensions of a Window once it has been made visib开发者_开发知识库le, without enforcing minimum dimensions?


You can do this using the Resize (int width, int height) method.

0

精彩评论

暂无评论...
验证码 换一张
取 消