Label and TextField alignment

  1. 2 weeks ago

    David C

    Jan 14 Pre-Release Testers, Xojo Pro, XDC Speakers Derby, ITM

    Since the default height of a Label is 20 and the default height of a TextField is 22, how do others align them on a form:

    1. Top
    2. Middle
    3. Bottom
    4. Resize them to be the same height eg Label to 22

    I have usually chosen Top, but am open to a better alternative.

    Let the IDE snap the text baseline for you.
    In this project I have handy it's TextField.Top = 0 and Label.Top = 1.

  2. Emile S

    Jan 14 Europe (France, Strasbourg)

    5. Depends.

    In a form, the top one is aligned to the top and the bottom one is aligned to the bottom. Intermediary (ies) is (are) aligned by the IDE.

  3. Tim P

    Jan 14 Pre-Release Testers, Xojo Pro Answer Rochester, NY

    Let the IDE snap the text baseline for you.
    In this project I have handy it's TextField.Top = 0 and Label.Top = 1.

  4. Markus R

    Jan 14 Pre-Release Testers, Xojo Pro Europe / Germany
    Edited 2 weeks ago

    i use also base line align in designer.
    change height of label to 22 then it have the same top as your textfield, looks also good.

or Sign Up to reply!