Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Property Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the background color of a field. The color has to be set using the hexadecimal RGB value as used in HTML. It only returns it's correct value if it was explicitly set. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //sets the background color of the field
forms.customer.elements.customer_id.bgcolor = "#FFFFFF";
//gets the background color of the field
var c = forms.customer.elements.customer_id.bgcolor; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=border}{tr:id=name}{td}h6.border{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets or sets the border attribute(s) of a specified element.
The border attributes:
borderType \- EmptyBorder, EtchedBorder, BevelBorder, LineBorder, TitleBorder, MatteBorder, SpecialMatteBorder.
size \- (numeric value) for: bottom, left, right, top.
color \- (hexadecimal value) for: bottom, left, right, top.
dash pattern \- (numeric value) for selected side(s).
rounding radius \- (numeric value) for selected side(s).
It only returns it's correct value if it was explicitly set.
NOTE: Use the same value(s) and order of attribute(s) from the element design time property "borderType".{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the border attribute(s) of a specified element. The border attributes: borderType - EmptyBorder, EtchedBorder, BevelBorder, LineBorder, TitleBorder, MatteBorder, SpecialMatteBorder. size - (numeric value) for: bottom, left, right, top. color - (hexadecimal value) for: bottom, left, right, top. dash pattern - (numeric value) for selected side(s). rounding radius - (numeric value) for selected side(s). It only returns it's correct value if it was explicitly set. NOTE: Use the same value(s) and order of attribute(s) from the element design time property "borderType". |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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"
forms.customer.elements.customer_id.border = 'LineBorder,1,#ccffcc'; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=enabled}{tr:id=name}{td}h6.enabled{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //gets the enabled state of the field
var currState = forms.customer.elements.customer_id.enabled;
//sets the enabled state of the field
forms.customer.elements.customer_id.enabled = !currentState; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=fgcolor}{tr:id=name}{td}h6.fgcolor{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets or sets the foreground color of a field. The color has to be set using the hexadecimal RGB value as used in HTML.
It only returns it's correct value if it was explicitly set.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the foreground color of a field. The color has to be set using the hexadecimal RGB value as used in HTML. It only returns it's correct value if it was explicitly set. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //sets the foreground color of the field
forms.customer.elements.customer_id.fgcolor = "#000000";
//gets the foreground color of the field
var c = forms.customer.elements.customer_id.fgcolor; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=font}{tr:id=name}{td}h6.font{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets or sets the font name, style, and size of an element.
font name \- the name of the font family.
style \- the type of the font. (plain = 0; bold = 1; italic = 2; bold\-italic = 3).
size \- the size of the font (in points).
It only returns it's correct value if it was explicitly set.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the font name, style, and size of an element. font name - the name of the font family. style - the type of the font. (plain = 0; bold = 1; italic = 2; bold-italic = 3). size - the size of the font (in points). It only returns it's correct value if it was explicitly set. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| forms.customer.elements.customer_id.font = 'Tahoma,1,11'; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=format}{tr:id=name}{td}h6.format{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets or sets the display formatting of an element for number and text values; does not affect the actual value stored in the database column.
There are different options for the different dataprovider types that are assigned to this field.
For Integer fields, there is a display and an edit format, using Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the display formatting of an element for number and text values; does not affect the actual value stored in the database column. There are different options for the different dataprovider types that are assigned to this field. For Integer fields, there is a display and an edit format, using http://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html |
|
|
|
http://docs.oracle.com/javase/7/docs/api/javax/swing/text/MaskFormatter.html |
|
|
|
http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html, |
|
|
|
\\ \\
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //sets the display formatting of the field
forms.customer.elements.customer_id.format = '###';
//gets the display formatting of the field
var format = forms.customer.elements.customer_id.format; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=imageURL}{tr:id=name}{td}h6.imageURL{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets/Sets the image displayed on a button or label; based on URL.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets/Sets the image displayed on a button or label; based on URL. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //dynamically sets an image displayed on a button or label
forms.customer.elements.customer_id.imageURL = "http://www.servoy.com/images/test.gif";
//sets an image from your own image library
forms.customer.elements.customer_id.imageURL = "media:///arrow.gif";
//loads an image (BLOB) from a field in a selected record into HTML
forms.customer.elements.customer_id.imageURL = 'media:///servoy_blobloader?datasource='+controller.getDataSource()+'&dataprovider=image_data&mimetype=image/jpeg&rowid1=2'; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=mnemonic}{tr:id=name}{td}h6.mnemonic{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets or sets the specified character(s) \- typically an underlined letter\- used with/without the modifier key(s) for the label, button or image.
Modifiers key values:
1 SHIFT
2 CTRL
4 Meta/CMD (Macintosh)
8 ALT(Windows, Unix); OPTION (Macintosh)
NOTE: A mnemonic is usually a single key used with/without the CTRL, CMD, SHIFT, ALT, or OPTION key(s) to activate a menu item or command \- depending, in part on whether the menmonic applies in a command line or graphic interface. For one description, you can refer to this web page: Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the specified character(s) - typically an underlined letter- used with/without the modifier key(s) for the label, button or image. Modifiers key values: 1 SHIFT 2 CTRL 4 Meta/CMD (Macintosh) 8 ALT(Windows, Unix); OPTION (Macintosh) NOTE: A mnemonic is usually a single key used with/without the CTRL, CMD, SHIFT, ALT, or OPTION key(s) to activate a menu item or command - depending, in part on whether the menmonic applies in a command line or graphic interface. For one description, you can refer to this web page: http://msdn.microsoft.com/en |
|
|
| \-us/library/bb158536.aspx |
|
|
|
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //gets the mnemonic of the element
var my_mnemoic = forms.customer.elements.customer_id.mnemonic;
//sets the mnemonic of the element
forms.customer.elements.customer_id.mnemonic = 'f'; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=rolloverImageURL}{tr:id=name}{td}h6.rolloverImageURL{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets/Sets the image displayed on a button or label roll over; based on URL.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
rolloverImageURL |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets/Sets the image displayed on a button or label roll over; based on URL. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //dynamically sets a roll over image displayed on a button or label
forms.customer.elements.customer_id.rolloverImageURL = "http://www.servoy.com/images/test.gif";
//sets an image from your own image library
forms.customer.elements.customer_id.rolloverImageURL = "media:///arrow.gif";
//loads an image (BLOB) from a field in a selected record into HTML
forms.customer.elements.customer_id.rolloverImageURL = 'media:///servoy_blobloader?datasource='+controller.getDataSource()+'&dataprovider=image_data&mimetype=image/jpeg&rowid1=2'; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=text}{tr:id=name}{td}h6.text{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets or sets the text that is displayed on the label, button or image.
NOTE: The .text property applies to labels, buttons, or images ONLY.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the text that is displayed on the label, button or image. NOTE: The .text property applies to labels, buttons, or images ONLY. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //gets the text of the element
var my_text = forms.customer.elements.customer_id.text;
//sets the text of the element
forms.customer.elements.customer_id.text = my_text + 'is cool'; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toolTipText}{tr:id=name}{td}h6.toolTipText{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets or sets the tool tip text of an element; text displays when the mouse cursor hovers over an element.
NOTE: HTML should be used for multi\-line tooltips; you can also use any valid HTML tags to format tooltip text.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
toolTipText |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the tool tip text of an element; text displays when the mouse cursor hovers over an element. NOTE: HTML should be used for multi-line tooltips; you can also use any valid HTML tags to format tooltip text. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //gets the tooltip text of the element
var toolTip = forms.customer.elements.customer_id.toolTipText;
//sets the tooltip text of the element
forms.customer.elements.customer_id.toolTipText = "New tip";
forms.customer.elements.customer_id.toolTipText = "<html>This includes <b>bolded text</b> and <font color='blue'>BLUE</font> text as well."; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=transparent}{tr:id=name}{td}h6.transparent{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets or sets the transparency of an element; true \- transparent; false \- not transparent.
NOTE: transparency can be inverted using ! operator: elements.elementName.transparent = Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
transparent |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the transparency of an element; true - transparent; false - not transparent. NOTE: transparency can be inverted using ! operator: elements.elementName.transparent = !elements.elementName.transparent; |
|
|
|
color{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //gets the transparency of the element
var currentState = forms.customer.elements.customer_id.transparent;
//sets the transparency of the element
forms.customer.elements.customer_id.transparent = !currentState; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=visible}{tr:id=name}{td}h6.visible{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\
{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getAbsoluteFormLocationY}{tr:id=name}{td}h6.getAbsoluteFormLocationY{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}getAbsoluteFormLocationY{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the absolute form (designed) Y location.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number] -- The y location of the form in pixels.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
|