Ed Leafe wrote: > On Jul 2, 2008, at 12:45 PM, johnf wrote: > >> Where gs is a grid sizer. >> gs.append(dabo.ui.dLabel(self,Caption='City',Alignment='right')) >> >> Shouldn't alignment right cause the text of the label to be on the >> right side >> of the gridsizer column? It is not doing what I would have >> expected. The >> text is left. > > You're specifying the alignment within the label itself. You seem to > want the label to align within the grid sizer. > > BTW, the practice of writing the object creation inside the sizer > append() is prone to confusing mistakes like this. If you had written > it as two steps: > > lbl = dabo.ui.dLabel(self,Caption='City',Alignment='right') > gs.append(lbl) > > your mistake would have been more obvious. The correct way to align > the label in the grid sizer would be: > > lbl = dabo.ui.dLabel(self, Caption="City") > gs.append(lbl, halign="right")
And to help with the concept a little, the label *was* right-aligned, within the bounds of the label. They label and sizer was smart enough to allocate just enough width to the label to show the caption. So your right-aligned label showed that way, but the label was left-aligned in the sizer. I intended to clear up some confusion, but perhaps made it more cloudy? Paul _______________________________________________ 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]
