[Solved] wxToolBar wxEVT_COMMAND_TOOL_ENTER

BlitzMax Forums/Brucey's Modules/[Solved] wxToolBar wxEVT_COMMAND_TOOL_ENTER

MOBii(Posted 2015) [#1]
wxToolBar:
Is it possible to get the objectid for the button while mouse over wxToolBar:
ConnectAny(wxEVT_COMMAND_TOOL_ENTER, OnFileMenu)
_event.getID() = I get toolbarid


ConnectAny(wxEVT_COMMAND_TOOL_CLICKED, OnFileMenu)
_event.getID() = here I get the buttonid not the toolbarid

I want to know what object the mouse enter on the wxToolBar


Henri(Posted 2015) [#2]
Hi,

you can get toolID within OnFileMenu-function with:
Function OnFileMenu(ev:wxEvent)
	Local c_ev:wxCommandEvent = wxCommandEvent(ev)
	Print "ToolID = " + c_ev.getselection()
EndFunction

-Henri


MOBii(Posted 2015) [#3]
Thank thee Henri that I never figure out myself!
it work's perfectly!