Jean-Michel Fauth wrote:
As a challenge, I tried to do something.I assumed the StaticText ctrls
have a constant size, but the TextCtrl ctrls should vary in width.Two solutions using a) LayoutConstraints b) packed sizers.I just wrote
the two in your style. Tested on my platform win98, Py2.3.3,
wxPy2.4.2.4
Probably, there is a still a better way.
Thanks very much for the code--it works well. For those that are
interested, I incorporated these 2 examples into the test program.
Additionally, there is a 3rd new example using the wxGenStaticText
class from stattext.py that Robin kindly suggested. (It gets border
errors in Windows, though, so there are 2 parallel classes derived
from wxGenStaticText and wx.StaticText. I liked using FlexGridSizer,
because this makes it easier to use a function to quickly add
name/value combinations, thus reducing code size and making it
easier to add new items, by simply adding:
self.addData( <name>, <value> )
John
label_data3.py (16.7 KB)