Changing toolbar bitmap at runtime

Gian Lorenzetto gian at anatomics.com
Sun Sep 3 05:16:16 PDT 2006


Hi Vadim,

Yes, I'm on win32/VC++.

I will try the Freeze()/Thaw() option and I will also have a quick look thr=
ough the code to see if there is anything obviously wrong with the second c=
alll to Realize() ...

Thanks,
Gian


-----Original Message-----
From: Vadim Zeitlin [mailto:vadim at wxwindows.org]
Sent: Sun 9/3/2006 9:21 AM
To: wx-users at lists.wxwidgets.org
Subject: Re: Changing toolbar bitmap at runtime
 =

On Fri, 1 Sep 2006 15:55:35 +1000 Gian Lorenzetto <gian at anatomics.com> wrot=
e:

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/



---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wx-users-help at lists.wxwidgets.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3279 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wx-users/attachments/20060903/af=
47d566/attachment.bin


More information about the wx-users mailing list