english português


search
login   |   sign up   |   buy
     
Downloads
  Documentation
  Bug reports
  Changelogs
  Support
  Compatibility







Tips and Tricks / Details

Apr 05 | Container to align Labels

  We introduced, in TotalCross 1.1, a new Container that is used to align a set of Controls with Labels: AlignedLabelsContainer. This was somewhat dificult to do using relative positioning. The idea of the control is that you pass an array of Strings in the constructor and then it computes the width of the biggest String. Then it sets the Insets of the Container to don't allow new controls to be added over the Labels. So, LEFT/AFTER in this control will exclude the area of the Labels. You can fine control the distance between each Label, and also the alignment (LEFT, CENTER, RIGHT). Note that there are no Labels at all in the Control: it just draws the Strings one after the other. Here is a picture of the new Control, which was taken from the UIGadgets sample:

 

Go read other tips

 

Copyright© 2002-2009 SuperWaba15 userssite map