Harry van Haaren said the following at 09/08/2011 05:29 PM : > On Thu, Sep 8, 2011 at 7:53 PM, D. R. Evans <doc evans gmail com> wrote: > >> How do I set the precise size of a Label? >> > > >> the Label expands to show the text >> > > Why would you *not* want this? It would result in text going "off the edge", > and not being readable... > From the Gtk::Fixed documentation: "The Gtk::Fixed widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels." So it apparently can do exactly what I need. Also, the documentation amply warns the user about why he might not want to use a Fixed container, concluding a list of consequences of using Fixed with: "Finally, fixed positioning makes it kind of annoying to add/remove GUI elements, since you have to reposition all the other elements. This is a long-term maintenance problem for your application. If you know none of these things are an issue for your application, and prefer the simplicity of Gtk::Fixed, by all means use the widget. But you should be aware of the tradeoffs." Since my application is indeed one in which none of the listed drawbacks is an issue, and the ability to "place child widgets at fixed positions and fixed sizes" is precisely what I need, then it seems that a Frame exactly the right container to use. Maybe I shouldn't be using Label? What's a good alternative that can indeed be used in a Fixed with a fixed position and fixed size? I need the widget to be able to display text and to accept events. Doc -- Web: http://www.sff.net/people/N7DR
Attachment:
signature.asc
Description: OpenPGP digital signature