Changing toolbar bitmap at runtime
Vadim Zeitlin
vadim at wxwindows.org
Sat Sep 2 16:21:04 PDT 2006
On Fri, 1 Sep 2006 15:55:35 +1000 Gian Lorenzetto <gian at anatomics.com> wrote:
GL> This works pretty well, except that the call to Realize() causes the
GL> toolbar containing the tool to re-home to the top-left corner of the
GL> frame (it should be aligned vertically on the right-hand side of the
GL> container).
This looks like a bug in wxMSW (which I assume you use). It should
probably only do this when it's called for the first time or maybe only if
the toolbar size changed...
GL> So I then call Layout() on the parent to correctly set the
GL> position of the toolbar.
GL>
GL> The problem is that the last call to Layout() triggers some sort of
GL> nasty screen flashing, where it looks like the toolbar is momentarily
GL> drawn in the top-left corner, then moves to the correct location.
GL>
GL> Is there any way to avoid this flashing?
Try calling Freeze() (and then Thaw()) on the frame.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list