You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by ke...@sz.murata.com.cn on 2010/07/23 05:27:49 UTC
How to set the font color for Form.label
Hi All,
How to set the font color for Form.label?
For Exmple :
How to set red color for heading="Personal Information".
How to set red color for Form.label="Name"
<Form xmlns:wtkx="http://pivot.apache.org/wtkx"
xmlns="org.apache.pivot.wtk">
<sections>
<Form.Section heading="Personal Information">
<BoxPane wtkx:id="nameBoxPane" Form.label="Name">
<TextInput wtkx:id="lastNameTextInput" prompt="Last"/>
<TextInput wtkx:id="firstNameTextInput" prompt="First"/>
</BoxPane>
</Form.Section>
<Form.Section heading="Addresses">
<BoxPane Form.label="Home" orientation="vertical">
<TextInput prompt="Street" textSize="24"/>
<BoxPane>
<TextInput prompt="City"/>
<TextInput prompt="State" textSize="6"/>
<TextInput prompt="Zip" textSize="10"/>
</BoxPane>
</BoxPane>
<BoxPane Form.label="Work" orientation="vertical">
<TextInput prompt="Street" textSize="24"/>
<BoxPane>
<TextInput prompt="City"/>
<TextInput prompt="State" textSize="6"/>
<TextInput prompt="Zip" textSize="10"/>
</BoxPane>
</BoxPane>
</Form.Section>
<Form.Section heading="Phone Numbers">
<TextInput Form.label="Home"/>
<TextInput Form.label="Work"/>
</Form.Section>
<Form.Section heading="Email Addresses">
<TextInput Form.label="Home"
Form.flag="{messageType:'info', message:'We won\'t spam
you!'}"/>
<TextInput Form.label="Work"/>
</Form.Section>
</sections>
</Form>
Best regards,
Ken Jiang
*******************************************
Murata Electronics Trading (Shenzhen) Co.,Ltd
Tel:86-755-82847251
E-mail:kenjiang@sz.murata.com.cn
*******************************************
Re: How to set the font color for Form.label
Posted by Greg Brown <gk...@mac.com>.
Are you trying to highlight an error to the user? If so, you should use Form.setFlag(). Specifying a flag message type of "error" will draw an error icon next to the field and a red rectangle around it. If you specify a flag message, it will appear in a red popup when the user mouses over the field. Other message types behave similarly.
On Jul 22, 2010, at 11:27 PM, kenjiang@sz.murata.com.cn wrote:
>
> Hi All,
>
> How to set the font color for Form.label?
> For Exmple :
> How to set red color for heading="Personal Information".
> How to set red color for Form.label="Name"
>
> <Form xmlns:wtkx="http://pivot.apache.org/wtkx"
> xmlns="org.apache.pivot.wtk">
> <sections>
> <Form.Section heading="Personal Information">
> <BoxPane wtkx:id="nameBoxPane" Form.label="Name">
> <TextInput wtkx:id="lastNameTextInput" prompt="Last"/>
> <TextInput wtkx:id="firstNameTextInput" prompt="First"/>
> </BoxPane>
> </Form.Section>
> <Form.Section heading="Addresses">
> <BoxPane Form.label="Home" orientation="vertical">
> <TextInput prompt="Street" textSize="24"/>
> <BoxPane>
> <TextInput prompt="City"/>
> <TextInput prompt="State" textSize="6"/>
> <TextInput prompt="Zip" textSize="10"/>
> </BoxPane>
> </BoxPane>
> <BoxPane Form.label="Work" orientation="vertical">
> <TextInput prompt="Street" textSize="24"/>
> <BoxPane>
> <TextInput prompt="City"/>
> <TextInput prompt="State" textSize="6"/>
> <TextInput prompt="Zip" textSize="10"/>
> </BoxPane>
> </BoxPane>
> </Form.Section>
> <Form.Section heading="Phone Numbers">
> <TextInput Form.label="Home"/>
> <TextInput Form.label="Work"/>
> </Form.Section>
> <Form.Section heading="Email Addresses">
> <TextInput Form.label="Home"
> Form.flag="{messageType:'info', message:'We won\'t spam
> you!'}"/>
> <TextInput Form.label="Work"/>
> </Form.Section>
> </sections>
> </Form>
> Best regards,
> Ken Jiang
>
> *******************************************
> Murata Electronics Trading (Shenzhen) Co.,Ltd
> Tel:86-755-82847251
> E-mail:kenjiang@sz.murata.com.cn
> *******************************************
>
Re: How to set the font color for Form.label
Posted by Noel Grandin <no...@gmail.com>.
Hi
Unfortunately, there is currently no way to do that.
If you really need that, you're going to have to use GridPane to construct your own form.
Regards, Noel.
kenjiang@sz.murata.com.cn wrote:
> Hi All,
>
> How to set the font color for Form.label?
> For Exmple :
> How to set red color for heading="Personal Information".
> How to set red color for Form.label="Name"
>
> <Form xmlns:wtkx="http://pivot.apache.org/wtkx"
> xmlns="org.apache.pivot.wtk">
> <sections>
> <Form.Section heading="Personal Information">
> <BoxPane wtkx:id="nameBoxPane" Form.label="Name">
> <TextInput wtkx:id="lastNameTextInput" prompt="Last"/>
> <TextInput wtkx:id="firstNameTextInput" prompt="First"/>
> </BoxPane>
> </Form.Section>
> <Form.Section heading="Addresses">
> <BoxPane Form.label="Home" orientation="vertical">
> <TextInput prompt="Street" textSize="24"/>
> <BoxPane>
> <TextInput prompt="City"/>
> <TextInput prompt="State" textSize="6"/>
> <TextInput prompt="Zip" textSize="10"/>
> </BoxPane>
> </BoxPane>
> <BoxPane Form.label="Work" orientation="vertical">
> <TextInput prompt="Street" textSize="24"/>
> <BoxPane>
> <TextInput prompt="City"/>
> <TextInput prompt="State" textSize="6"/>
> <TextInput prompt="Zip" textSize="10"/>
> </BoxPane>
> </BoxPane>
> </Form.Section>
> <Form.Section heading="Phone Numbers">
> <TextInput Form.label="Home"/>
> <TextInput Form.label="Work"/>
> </Form.Section>
> <Form.Section heading="Email Addresses">
> <TextInput Form.label="Home"
> Form.flag="{messageType:'info', message:'We won\'t spam
> you!'}"/>
> <TextInput Form.label="Work"/>
> </Form.Section>
> </sections>
> </Form>
> Best regards,
> Ken Jiang
>
> *******************************************
> Murata Electronics Trading (Shenzhen) Co.,Ltd
> Tel:86-755-82847251
> E-mail:kenjiang@sz.murata.com.cn
> *******************************************
>