my 3 widgets have differents sizes. And i want them to be with a "TOP ALIGNMENT"
on the same line... But that doesnt work. I always have a BOTTOM ALIGNMENT.
my 3 widgets have differents sizes. And i want them to be with a "TOP ALIGNMENT"
on the same line... But that doesnt work. I always have a BOTTOM ALIGNMENT.
Would you have a solution for this problem ?
Try putting the items in a table and use the valign attribute on the <td> tags.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
def AlignWidgets(self, c):
""" Aligns all elements in html page """
while c:
if isinstance(c, html.HtmlContainerCell):
c.SetAlignVer(0)
self.AlignWidgets(c.GetFirstChild())
c = c.GetNext()
That works as i want. Except one thing :
When i re-load another page with the same code, THE ALIGNEMENT IS BAD until i
resize the frame.
So, is there a function to "refresh" the wx.html as "Layout()" or "Refresh"
(this 2 functions don't work) ???
I hope you understand a bit what I want to say....
But a table isn't what i'm looking for because i want my widgets to move in the
html page when the frame is resized.
I've found another solution with SetAlignVer() :
...
source = self.Source()
self.SetPage(source)
self.AlignWidgets(c = self.GetInternalRepresentation())
def AlignWidgets(self, c):
""" Aligns all elements in html page """
while c:
if isinstance(c, html.HtmlContainerCell):
c.SetAlignVer(0)
self.AlignWidgets(c.GetFirstChild())
c = c.GetNext()
That works as i want. Except one thing :
When i re-load another page with the same code, THE ALIGNEMENT IS BAD until i
resize the frame.
So, is there a function to "refresh" the wx.html as "Layout()" or "Refresh"
(this 2 functions don't work) ???
Calling htmlWin.SendSizeEvent() might do the trick.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!