jimkfoster
11-08-2007, 01:24 PM
Hello,
The edittext component in a DHTML runtime does not align its text along the vertical correctly.
Rather than seeing input text fields like this:
+---------------------+
| I am some text |
+---------------------+
I am seeing things like:
+- I am some text ----+
| |
+---------------------+
...meaning that the text of the input box is shifted up by a few pixels.
I have tried manipulating everything I could think of, but to no avail.
Finally, for this forum post (so as to remove my own code as at fault), I tried compiling to DHTML the example provided in the Laszlo Explorer, and it, too, exibits the very same results.
Specifically, I used the code from OpenLaszlo menu => Components => Form Components => Edit Text. You will find this code in your OpenLaszlo install at
http://127.0.0.1:8080/lps-4.0.5/examples/components/edittext_example.lzx
For convenience, here is that code, pulled straight from that url:
<canvas bgcolor="0xeaeaea" height="500">
<include href="lz/library.lzx" />
<dataset name="ds">
<item>first item from dataset</item>
<item>second item from dataset</item>
<item>third item from a dataset</item>
</dataset>
<view x="40" y="40" width="420" height="360" bgcolor="silver">
<constantlayout axis="x" value="20"/>
<simplelayout spacing="12" inset="20"/>
<edittext id="a">Name</edittext>
<edittext id="b" text="Address"></edittext>
<edittext id="c" text="555-555-1234"></edittext>
<view>
<text text="Notes:"/>
<edittext id="d" text="Multiline text displayed in an inputtext box with a defined width and height."
width="370" height="50" multiline="true"/>
<simplelayout spacing="2"/>
</view>
<view>
<simplelayout spacing="10" axis="x"/>
<text text="Username:"/>
<edittext id="d1"/>
<text text="Password:"/>
<edittext id="d2" password="true" text="password"/>
</view>
<view datapath="ds:/">
<constantlayout axis="x" value="15"/>
<simplelayout spacing="10"/>
<edittext width="150" datapath="item/text()"/>
</view>
</view>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ************************************************** *
* Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ************************************************** **** -->
<!-- @LZX_VERSION@ -->
Now the obvious questions:
Why is this so?
If this is a bug, has it been filed in JIRA, yet?
What can one do to rectify this, for the immediate need?
The edittext component is fundamental to forms, but the current way that it is displayed in a DHTML deployment is not acceptable for a professional web presentation, so any advise would be most appreciated.
Thank you!
The edittext component in a DHTML runtime does not align its text along the vertical correctly.
Rather than seeing input text fields like this:
+---------------------+
| I am some text |
+---------------------+
I am seeing things like:
+- I am some text ----+
| |
+---------------------+
...meaning that the text of the input box is shifted up by a few pixels.
I have tried manipulating everything I could think of, but to no avail.
Finally, for this forum post (so as to remove my own code as at fault), I tried compiling to DHTML the example provided in the Laszlo Explorer, and it, too, exibits the very same results.
Specifically, I used the code from OpenLaszlo menu => Components => Form Components => Edit Text. You will find this code in your OpenLaszlo install at
http://127.0.0.1:8080/lps-4.0.5/examples/components/edittext_example.lzx
For convenience, here is that code, pulled straight from that url:
<canvas bgcolor="0xeaeaea" height="500">
<include href="lz/library.lzx" />
<dataset name="ds">
<item>first item from dataset</item>
<item>second item from dataset</item>
<item>third item from a dataset</item>
</dataset>
<view x="40" y="40" width="420" height="360" bgcolor="silver">
<constantlayout axis="x" value="20"/>
<simplelayout spacing="12" inset="20"/>
<edittext id="a">Name</edittext>
<edittext id="b" text="Address"></edittext>
<edittext id="c" text="555-555-1234"></edittext>
<view>
<text text="Notes:"/>
<edittext id="d" text="Multiline text displayed in an inputtext box with a defined width and height."
width="370" height="50" multiline="true"/>
<simplelayout spacing="2"/>
</view>
<view>
<simplelayout spacing="10" axis="x"/>
<text text="Username:"/>
<edittext id="d1"/>
<text text="Password:"/>
<edittext id="d2" password="true" text="password"/>
</view>
<view datapath="ds:/">
<constantlayout axis="x" value="15"/>
<simplelayout spacing="10"/>
<edittext width="150" datapath="item/text()"/>
</view>
</view>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ************************************************** *
* Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ************************************************** **** -->
<!-- @LZX_VERSION@ -->
Now the obvious questions:
Why is this so?
If this is a bug, has it been filed in JIRA, yet?
What can one do to rectify this, for the immediate need?
The edittext component is fundamental to forms, but the current way that it is displayed in a DHTML deployment is not acceptable for a professional web presentation, so any advise would be most appreciated.
Thank you!