Re: Need a little help with GtkLabel Markup



"Kevin Vandersloot" <kfv101@xxxxxxx> writes:

> Hi folks. I'm working on fixing up the gnome-calculator display. Right now it
> uses a GtkEntry and reverses the direction using gtk_widget_set_direction.
> Obvioulsy this isn't right and it leads to quite a fex bugs. To get things
> right I'm trying to get it working with GtkLabel using the markup
> capabilities.
> Right now it works except I can't get the label to expand and right justify
> the
> text at the same time. I've tried all sorts of packing options to no avail.
> The
> problem is that I set the background of the label to a color, but since the
> label doesn't expand only part of the display gets the background color.

I'm not sure if the label will draw the background of areas without
text, but the way to make it right justified is to do:

gtk_misc_set_align (GTK_MISC (label), 1.0, 0.5);

> I guess I could just set the background of the hbox, but is there a
> way to do it without doing that. Attached is a screenshot.

I think you'll probably need to do something like this.

-Jonathan


...



Privacy