click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Schellink (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CLK-595) Can't apply to TextField label the same style as the one assigned to the Control
Date Sun, 07 Mar 2010 03:12:27 GMT

    [ https://issues.apache.org/jira/browse/CLK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842357#action_12842357
] 

Bob Schellink commented on CLK-595:
-----------------------------------

Hi Stefax

I just attempted an implementation as discussed above, but it doesn't give the desired effect,
especially when using margins. Applying the margin to the Field and Label still leaves the
Label floating off-center.

Where do you expect the Field's labelStyle to be rendered. On the label element or the surround
table cell?

kind regards

bob

> Can't apply to TextField label the same style as the one assigned to the Control
> --------------------------------------------------------------------------------
>
>                 Key: CLK-595
>                 URL: https://issues.apache.org/jira/browse/CLK-595
>             Project: Click
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 2.1.0 RC1
>         Environment: tomcat on linux
>            Reporter: Stefax
>             Fix For: 2.2.0
>
>
> I need to set the same margin-bottom to the TextFiled and its label, but when I call
the method setStyle("margin-bottom", "20px") of the TextField, it does not set the same margin/style
to its label; for the java code:
> TextField cld = new TextField("cld", "My Text Field: ");
>  cld.setSize(20);
> cld.setRequired(false);
> cld.setStyle("margin-bottom", "20px");            
> form.add(cld);
> the resultant html code (generated putting $form in the html) is:
> <td class="fields" align="left"><label for="form_cld">My Text Field: </label>&#160;</td>
> <td align="left"><input type="text" name="cld" id="form_cld" value="" size="20"
style="margin-bottom:20px;"/></td>
> As you can see the style is applied to the intput text, but not to its label.
> This generate a very ugly page, where all the label are rendered not near the fields
they refer to.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message