Hello guys,
I want apply different styles to an UltraTextEditor field at runtime, depending of the state; Read-Only, Required or Optional, as shown. is this possible with AppStylist?
Yes, it is possible.
The most simple solution is to define 3 different styles for UltraTextEditor, naming them "TextEditorLocked", "TextEditorRequired" and "TextEditorOptional". And then, in code, then the contol state changes you will have to set the StyleSetName to one of the names mentioned above.
Another solution may be to define the style for the read-only control and for a normal one (it might be for the required or optional). After that you will have to define only one extra style, "TextEditorRequired" or "TextEditorOptional", and apply it by code when the state of the control changes: if the control is in a standard style (not defined by name) the StyleSetName has to be set to the empty string, otherwise to the named style.
HTH,
Emanuel