Toggle bitmaps on toolbar

Is there a straight-forward way to add a button to a frame's Toolbar so that the bitmap displayed can be toggled easily between two bitmaps, depending upon status? For instance, show bitmap1 if data has been modified but not yet saved, and show bitmap2 if there are no pending updates to make.

Thanks.
Brian

Brian Wolf wrote:

Is there a straight-forward way to add a button to a frame's Toolbar so that the bitmap displayed can be toggled easily between two bitmaps, depending upon status? For instance, show bitmap1 if data has been modified but not yet saved, and show bitmap2 if there are no pending updates to make.

Not currently. This is another modification I've made for the OSAF wx.Toolbar that will eventually find its way back upriver to its original spawning location. :wink:

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Brian Wolf wrote:

Is there a straight-forward way to add a button to a frame's Toolbar so that the bitmap displayed can be toggled easily between two bitmaps, depending upon status? For instance, show bitmap1 if data has been modified but not yet saved, and show bitmap2 if there are no pending updates to make.

Not currently. This is another modification I've made for the OSAF wx.Toolbar that will eventually find its way back upriver to its original spawning location. :wink:

However, you can toggle bitmap1 between enabled and disabled states
(which change its appearance) using EnableTool(tool_id, True|False).

Steve

···

--
"The opinions expressed above do not reflect official NASA policies
  or positions, and have not been reviewed by any Government authority."

Brian Wolf wrote:

Is there a straight-forward way to add a button to a frame's Toolbar so that the bitmap displayed can be toggled easily between two bitmaps, depending upon status?

If wxToolBar doesn't behave as you'd like, it really wouldn't be very hard to make a custom control that did just what you want, at least for this simple instance.

-CHB

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov