Getting a widget to compute its height when given a fixed width

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone

I am working on a TreeView which uses a fairly complicated edit
widget. The edit widget contains a variable number of TextViews and I
am required to display the TextViews such that all of the text
contained with them will be displayed.

Therefore, given the width of the editor widget, I need the heights of
the sub-widgets in the editor widget (such that the above mentioned
requirement is satisfied).

At the moment I am computing the heights "by hand"; for example, I do
my own text layouts with Pango and then get the required heights.

I have had no success in getting widgets to report their "ideal"
heights when given a width. I can't use gtk_window_set_geometry_hints,
because I need to compute heights before the widgets receive windows
on which to draw themselves (if I am mistaken here, please help me
out; it seems I really have much to learn about GTK). I have tried
gtk_widget_set_size_request, but to no avail.

I have seen similar questions in the mailing list archive, although
the difference here is that I want to compute heights without having
to draw any widgets (if that is possible).

Thanks in advance
Wynand
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux