As a follow up to my original post, we're also having trouble with the
edittext control.

The edittext control is larger than a combobox.

We would like to have them be the same size, however when you try to make an
edittext control shorter, the text inside gets clipped off at the top.

If the centerline of the text was actually in the center of the control, we
could just shift our comboboxes down a pixel or two to at least line up the
text and it wouldnt look too bad.

I've attached a gif that shows a text, combobox, and edittext control all in
a line.

I set the background of all 3 controls to yellow to make the actual size of
the controls clearer.

I shifted the text control down 3 pixels using y="3" to make the text line
up.

As you can see, the text in the combobox and edittext already line up but
since the edittext is larger, it looks strange.



-----Original Message-----
From: William Krick [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 15, 2006 1:29 PM
To: [email protected]
Subject: [Laszlo-user] aligning labels with controls


Is there some way to align a text label with a control?

The example below shows all the things I tried, the only one that works is
explicitly setting the "y" on the label.

Hardcoding numbers for alignment just seems wrong.

Is there something I'm missing?




<canvas width="600" height="400" layout="axis:x">

  <class name="label" extends="text" text="ABCDEFG" bgcolor="yellow"/>
  <class name="combo" extends="combobox" editable="false"
defaulttext="ABCDEFG" bgcolor="red"/>

  <view y="10" layout="axis:y;spacing:10">

        <view x="10" layout="axis:x">
        <label/>
        <combo/>
        </view>

        <view x="10" layout="axis:x">
        <label height="22"/>
        <combo/>
        </view>

        <view x="10" layout="axis:x">
        <label valign="middle"/>
        <combo/>
        </view>

        <view x="10" layout="axis:x">
        <label valign="bottom"/>
        <combo/>
        </view>

        <view x="10" layout="axis:x">
        <label y="3" />
            <combo/>
        </view>

        </view>

</canvas>

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Attachment: lzalignment.gif
Description: GIF image

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to