Using SmartGwt, I use setShowHintInField(true) and I want to change the hint style so that the hint appears in gray. I'm new the SmartGwt so I don't know how to do it. The documentation for setShowHintInField says "CSS style for the hint is textBoxStyle with the suffix "Hint" appended to it" but I don't understand what it means. Do I set an attribute or property called textBoxStyleHint to whatever the CSS class I defined?
Announcement
Collapse
No announcement yet.
X
-
Hai
You can use the attribute "setHintStyle()" for the formitem.
And specify the css class in the style.
In my application its working.
For eg:-
DynamicForm loginForm = new DynamicForm();
userItem.setTitle("LOGIN");
userItem.setWidth(100);
userItem.setHeight(18);
userItem.setHint("(case sensitive)");
userItem.setHintStyle("hintTextStyle");
loginForm.setFields(userItem);
You have to mention the css class in your html or .css file.
.hintTextStyle{
font-weight: bold;
color: red;
}
-
Here's my CSS for the TextItem:
.myTextItem,
.myTextItemFocused,
.myTextItemDisabled,
.myTextItemError,
.myTextItemHint,
.myTextItemDisabled {
padding:2px;
border:1px solid #6AA0BB;
background:rgb(230,241,247) url(./images/controls/text_input.gif) repeat-x scroll;
color:#333333;
}
.myTextItemHint {
font-size: 1em;
color: Gray;
}
.myTextItemFocused {
background-color: Yellow;
}
When the TextItem has focus, the background color does not change to Yellow. Anyone see a problem with the CSS? Is there a know bug about this?
Comment
Comment