Show custom tool on NavToolbar staying pressed in

The standard navigation toolbar has tools that press in and stay pressed to put the interation into a “mode”, like zoom mode or pan mode. You press the zoom tool, it stays shown as pressed in while it’s in that mode.

I am trying to add a new custom tool to the toolbar, and want it to put things into a mode as well, and therefore stay pressed in until pressed again. How do I do that?

This is using the wxAgg backend. I searched through backend_wxagg and backend_bases and couldn’t figure it out. Normally in wxPython you specify the style of a tool as having, to quote its API, "wxITEM_CHECK for a checkable tool (such tool stays pressed after it had been
toggled) " Here I didn’t see any option for that.

Thanks,
Che

CORRECTION: My mistake, it’s not really shown pressed, more like “selected,” with a blue thin line highlighting its perimeter. In any case, it’s a cue to the user that the UI is in that mode. That’s what I’d like my custom tool to have.

···

On Wed, Feb 1, 2012 at 5:25 PM, C M <cmpython@…287…> wrote:

The standard navigation toolbar has tools that press in and stay pressed to put the interation into a “mode”, like zoom mode or pan mode. You press the zoom tool, it stays shown as pressed in while it’s in that mode.