On Oct 7, 2005, at 7:03 PM, Carl Karsten wrote:
So you can't define a Address UI like this:
addr1
addr2
city st zip
Sure you can. Are you saying that you need absolute positioning
to do that?
Assuming that you have controls named as you have them above:
# Create a vertical sizer
vsz = dabo.ui.dSizer("v", Border=3, BorderAll=True)
# Add the addr lines
vsz.append(addr1, 0, "expand")
vsz.append(addr2, 0, "expand")
# Create a horizontal sizer for the CSZ line
hsz = dabo.ui.dSizer("h")
hsz.append(city, 1, "expand")
hsz.append(st, 0)
hsz.append(zip, 0)
# Add the horizontal sizer to the vertical
vsz.append(hsz, 0, "expand")
# Force the sizers to resize
self.layout()
This will result in the layout you expect, with three lines that
remain constant in height, but which will expand left to right to
fill the available space. There will be a 3-pixel border around each
row.
Don't worry if you don't get all the parameters just now. After
a while, they'll seem second nature; for now, just see if you can
picture the layout process.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users