Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder Components » View Thread |
Messages 1 to 4 of 4 total |
TCheckbox vertical alignment |
Tue, Oct 13 2015 9:42 AM | Permanent Link |
Matthew Jones | Can someone help me understand this please?
Make a new form, drop on a TLabel, a TCheckbox, and another TLabel. Set their layout to TopLeft, consume right. Now set the top margin for the labels to 6. The "Captions" are all aligned nicely yes? (You might want to reduce the width of the checkbox to get it closer.) So now run it. The Checkbox label is lower than the other texts. Why? Should I just fudge it, or is there something I need to know? It makes my output look poor when I have these mis-aligned items, and I need to impress on this current project... Thanks, Matthew |
Tue, Oct 13 2015 11:45 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
If a post isn't about *creating* components, then please post it in the General support forum. << So now run it. The Checkbox label is lower than the other texts. Why? >> This is a problem with the sub-pixel rendering in certain browsers (IE being one of them). The properties available for element measurement report back whole-pixel values, whereas the *actual* measurements may be more or less than that (floats). I will see if I can adjust for this in the layout management for design-time/run-time for the heights. I already do so for the width measurements. Tim Young Elevate Software www.elevatesoft.com |
Thu, Oct 15 2015 3:24 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
After investigating this further, there's really no bullet-proof way to handle this so that the check box labels align with TLabels without using a container control in which to position the labels as Layout.Position=lpCenter. It's just the nature of what's going on: the check box is doing the vertical layout center on an auto-sized label, whereas the labels themselves are vertically-sized using a text height measurement relative to a baseline calculated by the browser. As such, the label heights could theoretically be different at runtime, and especially when comparing runtime vs. design-time. Tim Young Elevate Software www.elevatesoft.com |
Fri, Oct 16 2015 4:31 AM | Permanent Link |
Matthew Jones | Tim Young [Elevate Software] wrote:
> After investigating this further, there's really no bullet-proof way > to handle this so that the check box labels align with TLabels > without using a container control in which to position the labels as > Layout.Position=lpCenter. It's just the nature of what's going on: > the check box is doing the vertical layout center on an auto-sized > label, whereas the labels themselves are vertically-sized using a > text height measurement relative to a baseline calculated by the > browser. As such, the label heights could theoretically be different > at runtime, and especially when comparing runtime vs. design-time. Okay, I can live with that solution. Thanks. |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |