Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsRAP Theming (Focus)
https://www.eclipse.org/forums/index.php/mv/msg/204743/654799/#msg_654799
We're using CSS in our RAP product to enhance the user-interface elements using themes.
How do we implement the behavior in CSS to mimic the colored-border[ORANGE] when focus is GAINED to the control, and when focus is LOST it should color to default color[GRAY].
We want to implement this on following controls
Text, Combo, CCombo, DateTime, Spinner, etc.
Thanks,
Sudesh
]]>Sudesh Bulathsinhala2011-02-17T08:36:31-00:00Re: RAP Theming (Focus)
https://www.eclipse.org/forums/index.php/mv/msg/204743/654840/#msg_654840
you could try the following:
1. Define custom variants for "focused" and "unfocused" state:
Combo.focused, Text.focused {
border: border: 1px solid green;
}
Combo.unfocused, Text.unfocused {
border: border: 1px solid red;
}
2. Add FocusListener to the control and switch the theming custom
variant like:
combo.setData( WidgetUtil.CUSTOM_VARIANT, "focused" );
HTH,
Ivan
On 2/17/2011 10:36 AM, Sudesh Bulathsinhala wrote:
> Hello,
>
> We're using CSS in our RAP product to enhance the user-interface
> elements using themes.
>
> How do we implement the behavior in CSS to mimic the
> colored-border[ORANGE] when focus is GAINED to the control, and when
> focus is LOST it should color to alternative color[GRAY].
>
> We want to implement this on following controls
>
> Text, Combo, CCombo, DateTime, Spinner, etc.
>
>
>
> Thanks,
> Sudesh
>]]>Ivan Furnadjiev2011-02-17T10:31:48-00:00Re: RAP Theming (Focus)
https://www.eclipse.org/forums/index.php/mv/msg/204743/655274/#msg_655274
Thanks, it's working as expected.