May 02, 2024 22:44 Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Parameters Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Parameters Returns Supported Clients Sample Returns Supported Clients Sample Parameters Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Supported Clients Sample Parameters Supported Clients Sample Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients SampleSupported Clients
SmartClient
WebClient
NGClient
Extends
RuntimeComponent
Property Summary
String
URL
Gets or sets the relative URL string contained in a field with a design time display property of HTML_AREA only.
String
baseURL
Gets or sets the absolute base URL for the URL string contained in a field with a design time display property of HTML_AREA only.
String
bgcolor
Gets or sets the background color of a field.
String
border
Gets or sets the border attribute(s) of a specified element.
Number
caretPosition
Gets or sets the number value (position) of the text caret (text "I" bar) in a field.
Boolean
editable
Gets or sets the editable/read-only state of a field; true - editable; false - read-only.
Boolean
enabled
Gets or sets the enabled state of a specified field, also known as "grayed".
String
fgcolor
Gets or sets the foreground color of a field.
String
font
Gets or sets the font name, style, and size of an element.
Boolean
readOnly
Gets or sets the editable/read-only state of a field; true - read-only; false - editable; ! - the editable/read-only state is inverted (the opposite).
String
titleText
Gets or sets the title text.
String
toolTipText
Gets or sets the tool tip text of an element; text displays when the mouse cursor hovers over an element.
Boolean
transparent
Gets or sets the transparency of an element; true - transparent; false - not transparent.
Boolean
visible
Gets or sets the visibility of an element; true - visible; false - not visible; ! - the visibility state is inverted (the opposite).
Methods Summary
void
addStyleClass(styleName)
Adds a style to the styleClass property.
Number
getAbsoluteFormLocationY()
Returns the absolute form (designed) Y location.
String
getAsPlainText()
Gets the plain text for the formatted HTML/RTF text of a specified field element with a design time display property of HTML_AREA/RTF only.
Object
getClientProperty(key)
Gets the specified client property for the element based on a key.
String
getDataProviderID()
Get the data provider this UI element (display) is showing.
Object
getDesignTimeProperty(key)
Get a design-time property of an element.
String
getElementType()
Returns the type of a specified element.
String
getFormName()
Returns the name of the form.
Number
getHeight()
Returns the height of the current element.
Array
getLabelForElementNames()
Returns an Array of label element names that has this field filled in as the labelFor.
Number
getLocationX()
Returns the x location of the current element.
Number
getLocationY()
Returns the y location of the current element.
String
getName()
Returns the name of an element.
Number
getScrollX()
Returns the x scroll location of specified element - only for an element where height of element is less than the height of element content.
Number
getScrollY()
Returns the y scroll location of specified element - only for an element where height of element is less than the height of element content.
String
getSelectedText()
Returns the currently selected text in the specified text field or text area.
Number
getWidth()
Returns the width of the current element.
void
putClientProperty(key, value)
Sets the value for the specified element client property key.
void
removeStyleClass(styleName)
Removes a style from the styleClass property.
void
replaceSelectedText(s)
Replaces the selected text; if no text has been selected, the replaced value will be inserted at the last cursor position.
void
requestFocus()
Request the focus in this element.
void
requestFocus(mustExecuteOnFocusGainedMethod)
Request the focus in this element.
void
selectAll()
Selects all the contents of a field.
void
setLocation(x, y)
Sets the location of an element.
void
setScroll(x, y)
Sets the scroll location of an element.
void
setSize(width, height)
Sets the size of an element.
Property Details
URL
//sets the relative URL of the HTML_AREA field
%%prefix%%%%elementName%%.URL = "http://www.examples.com/icon.gif";
//gets the relative URL of the HTML_AREA field
var theURL = %%prefix%%%%elementName%%.URL;
baseURL
//gets the base URL of theField when display is HTML_AREA
var baseURL = %%prefix%%%%elementName%%.baseURL;
//sets the base URL of theField when display is HTML_AREA
%%prefix%%%%elementName%%.baseURL = "http://www.examples.com";
bgcolor
//sets the background color of the field
%%prefix%%%%elementName%%.bgcolor = "#FFFFFF";
//gets the background color of the field
var c = %%prefix%%%%elementName%%.bgcolor;
border
//sets the border type to "LineBorder"
//sets a 1 px line width for the bottom and left side of the border
//sets the hexadecimal color of the border to "#ccffcc"
%%prefix%%%%elementName%%.border = 'LineBorder,1,#ccffcc';
caretPosition
//get the current caretposition
var caretPos = %%prefix%%%%elementName%%.caretPosition;
//add one and set it
%%prefix%%%%elementName%%.caretPosition = caretPos+1;
editable
var currentState = %%prefix%%%%elementName%%.editable;
%%prefix%%%%elementName%%.editable = !currentState;
enabled
//gets the enabled state of the field
var currState = %%prefix%%%%elementName%%.enabled;
//sets the enabled state of the field
%%prefix%%%%elementName%%.enabled = !currentState;
fgcolor
//sets the foreground color of the field
%%prefix%%%%elementName%%.fgcolor = "#000000";
//gets the foreground color of the field
var c = %%prefix%%%%elementName%%.fgcolor;
font
%%prefix%%%%elementName%%.font = 'Tahoma,1,11';
readOnly
//gets the editable/read-only state of the field
var currentState = %%prefix%%%%elementName%%.readOnly;
//sets the editable/read-only state of the field
%%prefix%%%%elementName%%.readOnly = !currentState;
titleText
var titleText = %%prefix%%%%elementName%%.titleText;
toolTipText
//gets the tooltip text of the element
var toolTip = %%prefix%%%%elementName%%.toolTipText;
//sets the tooltip text of the element
%%prefix%%%%elementName%%.toolTipText = "New tip";
%%prefix%%%%elementName%%.toolTipText = "<html>This includes <b>bolded text</b> and <font color='blue'>BLUE</font> text as well.";
transparent
//gets the transparency of the element
var currentState = %%prefix%%%%elementName%%.transparent;
//sets the transparency of the element
%%prefix%%%%elementName%%.transparent = !currentState;
visible
//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
addStyleClass(styleName)
String
styleName
the name of the style class to add
%%prefix%%%%elementName%%.addStyleClass('redbg');
getAbsoluteFormLocationY()
var absolute_y = %%prefix%%%%elementName%%.getAbsoluteFormLocationY();
getAsPlainText()
var my_text = %%prefix%%%%elementName%%.getAsPlainText();
getClientProperty(key)
Object
key
user interface key (depends on operating system)
var property = %%prefix%%%%elementName%%.getClientProperty('ToolTipText');
getDataProviderID()
%%prefix%%%%elementName%%.getDataProviderID();
getDesignTimeProperty(key)
String
key
the name of the property
var prop = forms.orders.elements.mylabel.getDesignTimeProperty('myprop')
getElementType()
var et = %%prefix%%%%elementName%%.getElementType();
getFormName()
var name = %%prefix%%%%elementName%%.getFormName();
getHeight()
var ht = %%prefix%%%%elementName%%.getHeight();
getLabelForElementNames()
var array = elements.name_first.getLabelForElementNames();
for (var i = 0; i<array.length; i++)
{
elements[array[i]].fgcolor = "#ff00ff";
}
getLocationX()
var x = %%prefix%%%%elementName%%.getLocationX();
getLocationY()
var y = %%prefix%%%%elementName%%.getLocationY();
getName()
var name = %%prefix%%%%elementName%%.getName();
getScrollX()
var x = %%prefix%%%%elementName%%.getScrollX();
getScrollY()
var y = %%prefix%%%%elementName%%.getScrollY();
getSelectedText()
var my_text = %%prefix%%%%elementName%%.getSelectedText();
getWidth()
var w = %%prefix%%%%elementName%%.getWidth();
putClientProperty(key, value)
Object
key
user interface key (depends on operating system)
Object
value
a predefined value for the key
%%prefix%%%%elementName%%.putClientProperty('ToolTipText','some text');
removeStyleClass(styleName)
String
styleName
the name of the style class to remove
%%prefix%%%%elementName%%.removeStyleClass('redbg');
replaceSelectedText(s)
String
s
The replacement text.
//returns the current selected text
var my_text = %%prefix%%%%elementName%%.getSelectedText();
//replaces the current selected text
%%prefix%%%%elementName%%.replaceSelectedText('John');
requestFocus()
//request the focus in this %%prefix%%%%elementName%% (focus is also a text cursor on text components)
%%prefix%%%%elementName%%.requestFocus();
requestFocus(mustExecuteOnFocusGainedMethod)
Boolean
mustExecuteOnFocusGainedMethod
If true will execute onFocusGained method, else will not; default value is true.
//request the focus in this %%prefix%%%%elementName%% (focus is also a text cursor on text components), skip on focus gained method call
%%prefix%%%%elementName%%.requestFocus(false);
selectAll()
%%prefix%%%%elementName%%.selectAll();
setLocation(x, y)
Number
x
the X coordinate of the element in pixels.
Number
y
the Y coordinate of the element in pixels.
%%prefix%%%%elementName%%.setLocation(200,200);
setScroll(x, y)
Number
x
the X coordinate of the portal scroll location in pixels
Number
y
the Y coordinate of the portal scroll location in pixels
%%prefix%%%%elementName%%.setScroll(200,200);
setSize(width, height)
Number
width
the width of the element in pixels.
Number
height
the height of the element in pixels.
%%prefix%%%%elementName%%.setSize(20,30);