On Wednesday 13 June 2007 07:32, Ed Leafe wrote: > On Jun 13, 2007, at 10:12 AM, Uwe Grauer wrote: > > Still don't know what to do. > > Up to now i used this in my form: > > vs.append(dabo.ui.dButton(self, Caption="Show / Edit", > > Name="btnShow", OnHit=self.onHit_btnShow), alignment="middle", > > border=5) > > > > and then: > > def onHit_btnShow(self, evt): > > self.Form.callEditPer(False) > > > > Is this the prefered method? > > "Preferred" is a matter of taste. The two main ways of binding is to > pass the "On*" parameter to the constructor, or call bindEvent() on > the object. So to bind a double click event in the grid to a method, > you would do either one of these two: > > grd = dabo.ui.dGrid(self, OnGridMouseLeftDoubleClick=self.onGrid2Click) > > -or- > > grd = dabo.ui.dGrid(self) > grd.bindEvent(dEvents.GridMouseLeftDoubleClick, self.onGrid2Click) > > -followed by- > > def onGrid2Click(self, evt): > [you event code goes here] > > > -- Ed Leafe > -- http://leafe.com > -- http://dabodev.com When I design a class and want to bind an Event (to the class) do I bind it as self.Form.bindEvent(dEvent,????, _function) since I don't have an instance of the class? IOW how can I bind an event to my class from within the class?
-- John Fabiani _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
