mail-archives/gtk-sharp-list/2006-January/006885.html

104 строки
3.7 KiB
HTML
Исходник Постоянная ссылка Обычный вид История

2019-06-06 22:02:55 +03:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] Center text inside Tree Cells
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Center%20text%20inside%20Tree%20Cells&In-Reply-To=200601252342.57443.W.Mauer%40top-soft.info">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="006884.html">
<LINK REL="Next" HREF="006886.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] Center text inside Tree Cells</H1>
<B>Pedro Castro</B>
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Center%20text%20inside%20Tree%20Cells&In-Reply-To=200601252342.57443.W.Mauer%40top-soft.info"
TITLE="[Gtk-sharp-list] Center text inside Tree Cells">noup at users.sourceforge.net
</A><BR>
<I>Wed Jan 25 18:04:39 EST 2006</I>
<P><UL>
<LI>Previous message: <A HREF="006884.html">[Gtk-sharp-list] Center text inside Tree Cells
</A></li>
<LI>Next message: <A HREF="006886.html">[Gtk-sharp-list] Making a CellRendererButton
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#6885">[ date ]</a>
<a href="thread.html#6885">[ thread ]</a>
<a href="subject.html#6885">[ subject ]</a>
<a href="author.html#6885">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hi,
As i mentioned, using Xalign doesn't seem to work. The cell gets
centered, but the text doesn't.
See for yourself: <A HREF="http://mega.ist.utl.pt/~prmc/temp/CellRendererText.jpg">http://mega.ist.utl.pt/~prmc/temp/CellRendererText.jpg</A>
Wolfgang Mauer wrote:
&gt;<i>Hi,
</I>&gt;<i>the Xalign property from CellRenderText will work.
</I>&gt;<i>
</I>&gt;<i>Regards
</I>&gt;<i>Wolfgang
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;&gt;<i>I can't seem to find a way to center text inside tree cells. Currently,
</I>&gt;&gt;<i>i set the cell centered with &quot;cell.Xalign = 0.5f&quot;, but this only centers
</I>&gt;&gt;<i>the cell and not the text.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>This would work ok if i only had 1 line of text inside the cell, but
</I>&gt;&gt;<i>with 2 or more lines the cell gets centered but the text is still
</I>&gt;&gt;<i>left-aligned inside the cell.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>Any hints?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>Thanks,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;<i>_______________________________________________
</I>&gt;<i>Gtk-sharp-list maillist - <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">Gtk-sharp-list at lists.ximian.com</A>
</I>&gt;<i><A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>
--
Pedro Castro
<A HREF="http://mega.ist.utl.pt/~prmc">http://mega.ist.utl.pt/~prmc</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="006884.html">[Gtk-sharp-list] Center text inside Tree Cells
</A></li>
<LI>Next message: <A HREF="006886.html">[Gtk-sharp-list] Making a CellRendererButton
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#6885">[ date ]</a>
<a href="thread.html#6885">[ thread ]</a>
<a href="subject.html#6885">[ subject ]</a>
<a href="author.html#6885">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
mailing list</a><br>
</body></html>