On Monday 19 January 2009 10:14:07 pm Paul McNett wrote: > johnf wrote: > > Should have - Because I could really use a simple way to avoid the > > setting RegID's in subclasses and still have access to the objects in > > code. > > Whatever is instantiating the class is usually the one that wants access to > the instantiated object, so just set an attribute: > > self.txtLastName = TextBoxSubclass(self, ...) > > Paul
Thanks I got. You do either set the RegID after instantiating the class as in frm=NewClass() frm.textBox.RegID= 'TextBox_1' or you create the object in the subclass as follows self.txtLastName = TextBoxSubclass(self, ...) which then allows you to access the object like frm.NewClass() frm.txtLastName="McNett" -- 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/[email protected]
