Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Over Style state not working on TextItem.setTextBoxStyle

    I’m using SmartGWT 5.0-p20141231

    I’m trying to change the background color for a DynamicForm TextItem when the cursor hovers or rolls over the text box.

    Here is my Java code:

    Code:
    DynamicForm form = new DynamicForm();
    TextItem text = new TextItem();
    text.setTextBoxStyle("logon-text-box");
    form.setItems(text);
    form.draw();
    Here is the CSS that goes along with this:

    Code:
    .logon-text-box {
        border: 1px solid rgb(224,224,244); 
        box-shadow: 0px 1px 2px rgba(0,0,0,0.05);
        margin-top: 10px;
        margin-bottom: 20px;
        
        background: rgb(250,250,250); 
     }
    
    .logon-text-boxSelected, .logon-text-boxFocused, .logon-text-boxOver, .logon-text-boxSelectedOver {
        border: 1px solid rgb(224,224,244); 
        box-shadow: 0px 1px 2px rgba(0,0,0,0.05);
        margin-top: 10px;
        margin-bottom: 20px;
        
        background: rgb(240,240,240); 
     }
    The background color of the text box will change when selected or focused. However cursor over or hover does not change the background of the text box.

    Also, if possible, could you reference a document which definitively defines all the possible style states?

    #2
    FormItems don't support an "Over" state - please see the doc for FormItembaseStyle - https://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/docs/FormItemBaseStyle.html

    Comment

    Working...
    X