Announcement

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

    Best practice: Different display for "normal" FormItems and showFilterRow FormItems

    Hi Isomorphic

    could you tell me the best way to archive the following:

    I have a 5.0p Simplicity-skin based application that uses larger than normal FormItems and a slightly larger google web font ("Dosis", 14pt).
    Code:
    	font-family: 'Dosis', 'Open Sans', Arial, sans-serif;
    	font-size: 14px;
    I also have the items a bit higher:
    Code:
    	private static void setTextItemDefaultApperance() {
    		TextItem ti = new TextItem() {
    			{
    				setWidth("*");
    				setHeight(34);
    				setCanSelectText(true);
    
    			}
    		};
    		TextItem.setDefaultProperties(ti);
    	}
    and round the FormItem subclasses corners:
    Code:
    .staticTextItem,
    .staticTextItemDisabled,
    .staticTextItemError,
    .textItem,
    .textItemFocused,
    .textItemDisabled,
    .textItemDisabledHint,
    .textItemError,
    .textItemHint {
    	border-radius: 5px;
    }
    
    .selectItemControlError,
    .selectItemControlFocused,
    .selectItemText,
    .selectItemTextError,
    .selectItemTextDisabled,
    .selectItemTextFocused,
    .selectItemTextHint,
    .selectItemTextDisabledHint,
    .comboBoxItem,
    .comboBoxItemFocused,
    .comboBoxItemError,
    .comboBoxItemDisabled,
    	.comboBoxItemPendingText {
    	border-top-left-radius: 5px;
    	border-bottom-left-radius: 5px;
    }
    This is working fine for me.
    But when a ListGrid shows its FilterRow, the FormItems there are also rounded, which does not look good (see screenshot). How do I tell the framework to keep these non-rounded best?

    This might relate to this current thread.

    Thank you & Best regards
    Blama
    Attached Files

    #2
    You probably do not want to change the default FormItem appearance to rounded, as there are many, many contexts where various framework widgets reuse FormItems and where rounding would look bad.

    Basically it sounds like you want items to be rounded only when you are defining specific forms, so you could create trivial subclasses of the relevant items with your styling changes applied, and specify that you want to use them via the EditorType property in the specific forms where it makes sense.

    Comment

    Working...
    X