Hi all,
I may be doing it wrong, so what better place to ask.

I'm trying to create a re-usable form/dialog for adding 'Employees' to an
application.  I thought sub-classing dOkCancelDialog would do the trick,
using the addControls method to add in my customizations.  Things seem to
be working as expected, other than the form being really skinny.  Thus, the
EditBox (I snipped the additional text) has a vertical scrollbar  Here's
the snippet of code I'm using:

  def addControls(self):
    self.Caption = "Manage Employee"
    self.AutoSize = True
    sizer = self.Sizer
    text = "Enter as much or as little information about the employee
here."
    label = dabo.ui.dEditBox(self, Value=text, ReadOnly=True,
BorderStyle="None", BackColor=self.BackColor)
    sizer.append1x(label)
    
    grid = dabo.ui.dGridSizer()
    grid.MaxCols = 2
    grid.append(dLabel(self, Caption="Prefix:"), layout="x")
    grid.append(dabo.ui.dTextBox(self, Name=("txtEmpPrefix"),
SelectOnEntry=True), layout="x")
    grid.append(dLabel(self, Caption="First Name:"), layout="x")
    grid.append(dabo.ui.dTextBox(self, Name=("txtEmpFirstName"),
SelectOnEntry=True), layout="x")
    grid.append(dLabel(self, Caption="Last Name:"), layout="x")
    grid.append(dabo.ui.dTextBox(self, Name=("txtEmpLastName"),
SelectOnEntry=True), layout="x")
    grid.append(dLabel(self, Caption="Suffix"), layout="x")
    grid.append(dabo.ui.dTextBox(self, Name=("txtEmpSuffix"),
SelectOnEntry=True), layout="x")
    grid.append(dLabel(self, Caption="Username:"), layout="x")
    grid.append(dabo.ui.dTextBox(self, Name=("txtEmpUsername"),
SelectOnEntry=True), layout="x")
    grid.append(dLabel(self, Caption="Hire Date:"), layout="x")
    grid.append(dabo.ui.dDateTextBox(self, Name=("txtEmpHireDate"),
SelectOnEntry=True), layout="x")

Am I doing this incorrectly?  Is there the better, more re-usable way that
I should be using?

Thanks,
Dave



_______________________________________________
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