Hi, in my dPage I'm using a dGridSizer but I don't seem to get how to
use it.

I want 2 cols, the first are labels so I want the slot NOT to grow and
keep space to a minimum.
Second col are data txtBoxes, I want them to occupy the rest of the
space available (to the right).
In the class designer I'm able to set the proportion of each of the
elements I add to a grid sizer but I'm not being able to do the same in
code.

In the following code I get an exception (TypeError: append() got an
unexpected keyword argument 'proportion') in *ps.append(txtNombre, 'x',
proportion=1, halign='left')*, so obviously I can not use proportion.
So how can I tell the sizer that I don't want the first column to grow
horizontally but I want the second column to do so?

class PgGral(dui.dPage):
    def initProperties(self):
        self.RegID = "PgGral"
        self.Caption = 'General'

    def afterInitAll(self):
        pnl = dui.dPanel(self)
        ss = self.Sizer = dui.dSizer('v')
        ss.append1x(pnl)

        lblNombre = dui.dLabel(pnl
                            , Caption='Menú :')
        txtNombre = dui.dTextBox(pnl
                                , RegID='txtNombre'
                                , SelectOnEntry=True
                                , TextLength=50
                                , DataSource='menu'
                                , DataField='Nombre')
        lblObs = dui.dLabel(pnl
                            , Caption='Observaciones :')
        edtObs = dui.dEditBox(pnl
                                , RegID='txtObs'
                                , SelectOnEntry=True
                                , DataSource='menu'
                                , DataField='Observ')
        ps = pnl.Sizer = dui.dGridSizer(MaxCols=2, VGap=2, HGap=4)
        ps.append(lblNombre, halign='right')
        ps.append(txtNombre, 'x', proportion=1, halign='left')
        ps.append(lblObs,'x', halign='right')
        ps.append(edtObs,'x', halign='left')
    ## Todo : Agregar más campos de menú

_______________________________________________
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