Reputation: 456
Here has a gtk4 window (ApplicationWindow
) which contain a gtk Label
. When I fill a long multi-line text in the label, the window auto become large width and height, this no problem. But I fill a short text in the label again, I want the window resize to smaller to fit the label size.
Gtk.Widget.width_request
no effect on both label and window.
Upvotes: 0
Views: 1009
Reputation: 1
You can use void gtk_window_set_default_size(GtkWindow* window, int width, int height)
to set a different window height and width.
Upvotes: 0
Reputation: 132
Type: gboolean
Description
If TRUE, users can resize the window.
Setter method
gtk_window_set_resizable
Getter method
gtk_window_get_resizable
Upvotes: 0