#NEWLINE# def _on_tool( self , event ) : #NEWLINE# #INDENT# ' Called when the tool palette button is clicked. ' #NEWLINE# action = event . item . action #NEWLINE# action_event = ActionEvent ( ) #NEWLINE# is_checkable = ( ( action . style == 'radio' ) or ( action . style == 'check' ) ) #NEWLINE# action . checked = ( self . tool_palette . get_tool_state ( self . tool_id ) == 1 ) #NEWLINE# action . perform ( action_event ) #NEWLINE# return