[Gtk-sharp-list] Center text inside Tree Cells

Pedro Castro noup at users.sourceforge.net
Wed Jan 25 18:04:39 EST 2006


Hi,

As i mentioned, using Xalign doesn't seem to work. The cell gets 
centered, but the text doesn't.

See for yourself: http://mega.ist.utl.pt/~prmc/temp/CellRendererText.jpg



Wolfgang Mauer wrote:

>Hi,
>the Xalign property from CellRenderText will work.
>
>Regards
>Wolfgang
>
>  
>
>>I can't seem to find a way to center text inside tree cells. Currently,
>>i set the cell centered with "cell.Xalign = 0.5f", but this only centers
>>the cell and not the text.
>>
>>This would work ok if i only had 1 line of text inside the cell, but
>>with 2 or more lines the cell gets centered but the text is still
>>left-aligned inside the cell.
>>
>>Any hints?
>>
>>
>>Thanks,
>>    
>>
>_______________________________________________
>Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
>  
>


-- 
Pedro Castro

http://mega.ist.utl.pt/~prmc



More information about the Gtk-sharp-list mailing list