#NEWLINE# def okcancel( panel , onOK = None , onCancel = None ) : #NEWLINE# #INDENT# btnsizer = wx . StdDialogButtonSizer ( ) #NEWLINE# _ok = wx . Button ( panel , wx . ID_OK ) #NEWLINE# _no = wx . Button ( panel , wx . ID_CANCEL ) #NEWLINE# panel . Bind ( wx . EVT_BUTTON , onOK , _ok ) #NEWLINE# panel . Bind ( wx . EVT_BUTTON , onCancel , onOK ) #NEWLINE# _ok . SetDefault ( ) #NEWLINE# btnsizer . AddButton ( _ok ) #NEWLINE# btnsizer . AddButton ( _no ) #NEWLINE# btnsizer . Realize ( ) #NEWLINE# return btnsizer