Maximum Width GtkContainer / GtkWidget

I am trying to write an application containing GtkBox (Horizontal), where I add a dynamic number of buttons (with labels) depending on various conditions. Now I want GtkBox not to exceed (for example) 600px. Button labels can be elliptical.

So my question is: is there a general way to solve this problem? If not, I think I will need to create a new container class that will keep track of its size.

I am using the C API for GTK ( gtk+-3.0)

+4
source share
2 answers

, , . size-allocate set_size_request .

- , , , , .

+2

GTK. CSS max-width CSS , .

, , . , GtkBin, , size_allocate , .

Emeus, GTK, , iOS.

+3

Source: https://habr.com/ru/post/1657211/


All Articles