wxglade - wxpython: multiple instances of a stock ID -



wxglade - wxpython: multiple instances of a stock ID -

is possible create wxpython frame several instances of same stock id?

i wish application include several "apply" buttons, , found quite convenient utilize id_apply themed icons , labels pre-defined. each button has specific handler. bound handlers triggered of these buttons.

is there way accomplish or approach doomed way handlers bound ids internally?

it's doomed. improve off creating subclass of wx.button has same , sense button want. can create instances of button , bind them whatever event handler want.

on other hand, if can set each button have unique name, utilize if statement in 1 event handler determine button , phone call different method based on that. see http://www.blog.pythonlibrary.org/2011/09/20/wxpython-binding-multiple-widgets-to-the-same-handler/ more details. suspect wx.id_apply override name of widget, i'm not sure. worth seek anyway.

wxpython wxglade

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -