Hi all
I have found some odd behaviour with a toolbar in a box sizer. Platform is
Python 2.4.1, wxPython 2.6.2.1, and MSW. The problem does not occur on GTK2.
The toolbar is created correctly, and is initially displayed correctly.
However, a subsequent call to tb.Realize() causes it to shift its position
upwards so that it is obscured by the static box surrounding it. A miniscule
resizing of the frame causes it to be displayed correctly, but the next time
tb.Realize() is called it goes wrong again.
A program showing the problem is attached. If you comment out the line
marked [1], the problem does not occur. I have included a StaticText control
in the toolbar, as this is the reason I have to call tb.Realize() in my live
app. I have some text, which varies in content and in size during the
running of the program. I can change the label, and under GTK2 the entire
toolbar is redrawn automatically. Under MSW, the text changes, but can then
over-write some of the other tools unless I call tb.Realize().
A secondary point, which I was not going to mention, but the attached
program happens to demonstrate it. I still do not have total control over
the appearance/disappearance of scroll bars. I can see no reason for them to
appear when running the program, and they do not appear if I run it under
GTK2, but under MSW they appear. Why?
A tertiary (?) point, which also happens to be demonstrated by this program.
I pointed out quite a long time ago that static text in a toolbar is
vertically aligned to the top of the toolbar under GTK2, which looks odd,
particularly when next to toolbar icons. It is purely cosmetic, but you can
see the effect when you run the program under GTK2.
Any suggestions will be appreciated.
Thanks
Frank Millman
fm40.py (2.17 KB)