May 13, 2024 06:39 Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients SampleSupported Clients
MobileClient
Extends
RuntimeComponent
Property Summary
Boolean
enabled
Gets or sets the enabled state of a specified field, also known as "grayed".
Boolean
visible
Gets or sets the visibility of an element; true - visible; false - not visible; ! - the visibility state is inverted (the opposite).
Methods Summary
String
getName()
Returns the name of an element.
Property Details
enabled
Gets or sets the enabled state of a specified field, also known as "grayed".
true - enabled; false - not enabled; ! - the enabled state is inverted (the opposite).
NOTE: A disabled element cannot be selected by clicking the element (or by pressing the TAB key even if this option is supported by the operating system).
NOTE: A label or button element will not disable if the "displayType" design time property for a field is set to HTML_AREA.
NOTE: The disabled "grayed" color is dependent on the LAF set in the Servoy Client Application Preferences. For more information see Preferences: Look And Feel in the Servoy Developer User's Guide.
//gets the enabled state of the field
var currState = %%prefix%%%%elementName%%.enabled;
//sets the enabled state of the field
%%prefix%%%%elementName%%.enabled = !currentState;
visible
Gets or sets the visibility of an element; true - visible; false - not visible; ! - the visibility state is inverted (the opposite).
NOTE: The visibility of an element is not persistent; the state of visibility only applies to the current user in his/her current session.
//sets the element as visible
forms.company.elements.faxBtn.visible = true;
//gets the visibility of the element
var currentState = forms.company.elements.faxBtn.visible;
//sets the element as not visible when the current state is visible
forms.company.elements.faxBtn.visible = !currentState;
Methods Details
getName()
Returns the name of an element. (may be null as well)
var name = %%prefix%%%%elementName%%.getName();