You might try adding them to the sizer with zero proportion and wx.EXTEND as the flag.
sizer.Add(statictext, 0, wx.EXTEND)
Which should give it the full width of the sizer.
andrea_gavana@tin.it wrote:
···
Hello NG,
I am working a little bit with statictext/genstatictext controls and
I have a question for you, NG.
Suppose I have 5 static text controls as follows:-------
Hello |
-------From |
-------
------------
wxPython |
------------
---------
2.6.0.0 |
---------
--
! |
--They are put in a vertical boxsizer.
I am using GenStaticText at the moment, and I use wx.EVT_ENTER_WINDOW and
wx.EVT_LEAVE_WINDOW to detect when the user is inside a particular statictext.
When the mouse enters, I set the background colour of that statictext to
blue, while it exist it comes back to white.My problem is that the 5 texts do not have the same width so, for example,
if I move my mouse to the "!" text control, I have to go really near the
"!" to activate the wx.EVT_ENTER_WINDOW.Now, to the question (sorry for my long posts, someone accused me to have
a diarroic word-processor in my mind...):Is there a way I can "Extend" the smaller texts (perhaps with spaces?) in
order to have *all* the text with the same width? Something like:------------
Hello |
------------From |
------------
wxPython |
------------
2.6.0.0 |
------------
! |
------------Something like a function "SetTextExtent" (that does not exist) that would
be the "opposite" of GetTextExtent? And, if it is possible, will I be limited
to fixed-font text controls?Thanks for every suggestion.
Andrea.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org