Child pages
  • Styling your Applications

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
titleTIP

It is normally easier to work with an existing style. Most of the sample solutions have a style associated with them and these style are imported when the solution is imported into Servoy Developer. You can also create a new style and copy/paste different entries from one style to another.


Setting Styles to Form Elements

Any elements on a form with a style applied will take the styling from the style definition entry.  For example, if using the style test, and there is a label entry in the test style sheet, then ANY label placed on the form will take the label style from the style sheet. 

To use something other than the default style for any given element, change the styleClass entry in the Properties view for that element. To do this:

  1. Select the desired element.
  2. In the Properties view, find the property styleClass.
  3. When clicking in the field, a drop down list will appear with all the available style classes for the element.  This list is contextual for the element (meaning you will only see label style classes if the element is a label, field classes if the element is a field, and so on.)
  4. Select the desired class from the list.
  5. If you want to go back to the default style definition, select DEFAULT.

Right click on the Styles node under the Resources node. Select Create new style from the menu. A window will appear.

...

Tip
titleTIP

If you are creating forms, the style sheet selected for the first form will be automatically selected in the New Form Wizard for subsequent forms. If you happen to not enter a style sheet in the wizard, but would like to apply a style sheet to many forms, just multiple select the forms in the Solution Explorer and edit the Properties view. This will change the property on all the forms you have selected.

Setting Styles to Form Elements

Any elements on a form with a style applied AND have a style definition entered for the element type will take the styling from the style definition entry.  For example, if I am using the style test, and there is a label entry in the test style sheet, then ANY label placed on the form will take the label style from the style sheet. 

To use something other than the default style for any given element, change the styleClass entry in the Properties view for that element. To do this:

...

.