Re: [gtkmm] Vertical labels?



Am Sam, 2003-07-26 um 18.40 schrieb Alex:
> Hi,
> 
> I have another problem with labels. I want to create a button bar at the left 
> and right sides of the window. The text on the buttons should be displayed 
> vertically. Is this possible with gtkmm2?
> 
> How can I create vertical labels?
> 
You can't do it directy, caus X dosn't support rotated text rendering
(at least for now).

The only way you can do it is realy hackish (you loos accessebility, the
possebility to mark the text, ...):

Render with the style functions a box to an image with the size of
allocation->width, allocation->hight switched of an appropriate label.

Render your text to a buffer, rotate the buffer and then render this
with alpha-blending again to the image.

If you render the text directly to the image, and then rotate the image,
it will look ugly, caus the shadows, ... of the theme will get rotated
too.

And at least, if you not use first the style funcions to render a box to
the image your label will look inconsistent. The only way to get around
this is to create an complete widget, that draws directly to its parent
window, like Gtk::Label does.

Conclusion: don't use rotated labels, it's bad UI-design.


Hope that helps

cheers
detlef

> Greets,
> Alex
>  
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list




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