On Sun, Mar 23, 2014 at 11:30 AM, Virgil Stokes <[email protected]> wrote:Hello
Chris,
> I am really stuck.... I would like to override the method BuildToolBar
> that is in NavCanvas.py, which according to the comments, was the intention
> in the design of NavCanvas. However, I have been unable to find a way of
> doing this.
>
> Please tell me how this can be done. An example would be sufficient.
>
Sorry -- tight no time, but the best thing to do is look at the current
BuildToolBar() code -- you probablywant to do what's in there, and add your
own extra stuff:
class MyNavCanvas(floatcanvas.NavCanvas):
## you may want to override __init__, if you need extra initialization
parameters.
def BuildToolBar():
tb = wx.ToolBar(self)
self.ToolBar = tb
tb.SetToolBitmapSize((24,24))
## call these if you want the Mode buttons
self.AddToolbarModeButtons(tb, self.Modes)
## call this is you want the "zoom to bounding box" button
self.AddToolbarZoomButton(tb)
## do extra stuff in here that you want.
tb.Realize()
HTH,
-Chris
--
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
[email protected]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas