class MainForm(dabo.ui.dForm):
    def afterInit(self):
        sz = self.Sizer = dabo.ui.dSizer()
        #pan = self.Panel = dabo.ui.dPanel(self, BackColor=(255,200,200))
        # or
        self.Panel = dabo.ui.dPanel(self, BackColor=(255,200,200), 
Name="Foo")
        sz.append1x(self.Panel)     # with the matching change here
        sz.layout()


A typical instance of a panel might be:
    pan = self.Panel = dabo.ui.dPanel(self, BackColor=(255,200,200))

It is also valid to write:
    self.Panel = dabo.ui.dPanel(self, BackColor=(255,200,200), Name="Foo")

Then you could refer to it as pan, or as self.Panel or as self.Foo

When coding in Python the first form seems to be the norm.
When using Class Designer, the third form seems to take over.

So quite where does the Name property fit in?
How should these different forms be best used?
-- Fraser Burns
_______________________________________________
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]

Reply via email to