[pygtk] Center aligning a wrapped gtk.label under a gtk.Image object

Anish Mangal anishmangal2002 at gmail.com
Fri Jul 23 17:30:38 WST 2010


> I may have misunderstood your words but I get it center aligned, as shown
> here: http://www.e-den.it/misc/center.png

That is exactly what I needed. Can you share your code? :-)

--
Anish



On Fri, Jul 23, 2010 at 12:21 PM, Alessandro Dentella <sandro at e-den.it> wrote:
> On Fri, Jul 23, 2010 at 11:35:18AM +0530, Anish Mangal wrote:
>> Hi,
>>
>> Can someone help me with this? Seems pretty trivial but I can't seem
>> to get it right. Thanks!
>>
>> --
>> Anish Mangal
>> anish at sugarlabs.org
>>
>> On Fri, Jul 2, 2010 at 2:26 PM, Anish Mangal <anishmangal2002 at gmail.com> wrote:
>> > Hi,
>> >
>> > I'm trying to center align gtk.label object under a gtk.Image object
>> > by putting them both in a vbox and calling the set_alignment, and
>> > set_justify tasks wherever needed. When I set the label wrapping to
>> > OFF, the label gets perfectly center aligned under the text. However,
>
> you mean under the *image*?
>
>> > I'm restricted to have label wrapping ON since the parent vbox needs
>> > to have a fixed horizontal dimension. So when I turn wrapping on, the
>> > label gets left aligned instead of being center aligned.
>> >
>> > I've sought for help on this on #pygtk with little success so far. Any
>> > help would be appreciated.
>> >
>> > Here is the pygtk code that demonstrates the issue.
>> > http://people.sugarlabs.org/~anish/table-image-label-center-test.py
>> >
>> > One can comment out the set_wrap lines and see that the label gets
>> > center aligned under the text.
>
> I may have misunderstood your words but I get it center aligned, as shown
> here: http://www.e-den.it/misc/center.png
>
> sandro
> *:-)
>
>
>
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>


More information about the pygtk mailing list