Re: StaticText alignment

"Brendan Simon (eTRIX)" <[email protected]>
Newsgroups gmane.comp.python.wxglade
Organization eTRIX pty ltd
Message-ID <[email protected]>
On 30/7/17 9:36 pm, Dietmar Schwertberger wrote:
> On 7/30/2017 12:28 PM, Brendan Simon (eTRIX) wrote:
>> I have some wx.StaticText widgets in some sizers.  I've specified the
>> sizer to expand and to align to the centre (horizontal and
>> vertical).  I've also specified the widget itself to align to the centre.
> Usually, if EXPAND is set, then ALIGN_CENTER has no effect any more.
>
>> Is this likely to be a wxglade issue or a wxPython (4.0.0b1) issue ?
> I would think that it's related to wxPython.
> Do you call sizer.Layout after changing the label?
> Also try sizer.GetItem(label).SetFlag(wx.ALIGN_CENTER) after changing
> the label.
Calling sizer.Layout() resolves this issue :)

Guess I was hoping that wxglade or wxPython would do that magic behind
the scenes.

Is there anyway for this to be done automatically?  A programmer goes to
the trouble of defining sizers with certain properties (expand, centre,
etc) and widgets with properties (e.g. centre), so setting the data
should automatically honour those properties, yes/no?

Brendan.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.