Re: box around a GtkLabel



Wallace Owen wrote:
On Fri, 2006-03-03 at 17:27 -0500, Zvi Sebrow wrote:

Wally, I thought about using a frame, but i couldnt find a way change the width of the lines (of the framei), or the color of the lines.
Is there a way to do that?


If you want your stuff to deviate from the default look and feel of Gtk,
first rethink (users expectations get perturbed, users get confused,
users gets angry with you).

Still here?  Check out Themes/Styles:

        http://developer.gnome.org/doc/API/2.0/gtk/GtkStyle.html


With themes, you will be able to modify what a GtkFrame looks like
throughout your application, you can even say what "this GtkFrame"
looks like... but since themes are usually used to give a global
look'n'feel throughout the desktop; its probably not where you want
to define what one particular widget looks like.

If you are implementing some custom part of a UI (i.e. you dont need
the user to mistake that urgent red outline for a GtkFrame component),
I would think that you were initially on the right track with your
drawing primatives etc; you can for example, set a background image on
some container widget (think you'll need to unset the GTK_NO_WINDOW
flag for that container) or do you drawing primatives on it as if
it was a drawing area; in which case you could even query the theme
engine for smart colours to use (a drawing area is just a raw GtkWidget,
you can usually use any widget for the same purpose).

From what I understood from your first original email (that I dont
have lying around anymore); was that you were trying to display a
widget on top of a GtkDrawingArea widget... you just cant do that in
GTK+, there is no such thing as overlapping widgets, period; in your
case (as I mentioned above); you need your background drawable widget
to be the container of the child.

Cheers,
                         -Tristan




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