Properties and Methods: Difference between revisions
Jump to navigation
Jump to search
C185driver (talk | contribs) |
|||
Line 23: | Line 23: | ||
| fontWeight || The thickness of the text. 100 to 900, higher values are darker. | | fontWeight || The thickness of the text. 100 to 900, higher values are darker. | ||
|- | |- | ||
| height || The height of the control in pixels | | height || The height of the control in pixels, in pixels, percent or 'auto'. | ||
|- | |- | ||
| hidden*|| True/False. Is the control hidden? Runtime method: Button1.hidden=True | | hidden*|| True/False. Is the control hidden? Runtime method: Button1.hidden=True | ||
Line 31: | Line 31: | ||
| id || The name of the control. The id is used to refer to the control in your program. | | id || The name of the control. The id is used to refer to the control in your program. | ||
|- | |- | ||
| left || The left bound of the control in pixels | | left || The left bound of the control in pixels, in pixels, percent or 'auto'. | ||
|- | |- | ||
| name || The name of the control. Optional: this field is used to POST data from a form. | | name || The name of the control. Optional: this field is used to POST data from a form. | ||
Line 45: | Line 45: | ||
| theme || The color theme to use. ‘a’ is black, ‘b’ is blue, ‘c’ is normal. Other letters can be custom defined. jQuery Mobile only. | | theme || The color theme to use. ‘a’ is black, ‘b’ is blue, ‘c’ is normal. Other letters can be custom defined. jQuery Mobile only. | ||
|- | |- | ||
| top|| Position of the top of the control, in pixels | | top|| Position of the top of the control, in pixels, percent or 'auto'. | ||
|- | |- | ||
| width|| The width of the control, in pixels | | width|| The width of the control, in pixels, percent or 'auto'. | ||
|- | |- | ||
| Visible|| Gets or sets whether control is visible. For iOS6, use ctrl.style.Visible. Can be True or False. | | Visible|| Gets or sets whether control is visible. For iOS6, use ctrl.style.Visible. Can be True or False. |
Revision as of 14:49, 15 May 2013
Description
Properties define the appearance and operation of controls. They are edited in the Property Editor window of the IDE. The properties described here are common to most controls. Properties that are specific to certain controls are discussed in the documentation for that control.
Property | Description |
---|---|
background | The color of the background of the control. Same values as color, plus transparent.* |
class | The css class to be used for the control. Settings in the class may override the values of other properties. |
color | The color of the text. Can be a color name, value (#RRGGBB) or rgb(r,g,b) function.* |
disabled** | The control is grayed out and will not accept input. Use .disabled=True or False to change this at runtime. |
fontFamily | The name of the font.* |
fontSize | The text size, in pixels.* |
fontStyle | The style of the text. Can be normal, italic or oblique.* |
fontWeight | The thickness of the text. 100 to 900, higher values are darker. |
height | The height of the control in pixels, in pixels, percent or 'auto'. |
hidden* | True/False. Is the control hidden? Runtime method: Button1.hidden=True |
hide() | Runtime method: i.e. Button1.hide |
id | The name of the control. The id is used to refer to the control in your program. |
left | The left bound of the control in pixels, in pixels, percent or 'auto'. |
name | The name of the control. Optional: this field is used to POST data from a form. |
resize(left,top,width,height) | Set the size and position of a control. Does not work for PictureBox and some other controls, or for Android 2.3 and older. |
show() | Runtime method: i.e. Button1.show |
style | The style of the control. Optional. Any valid HTML Style string can be used. Separate parameters with “;”. Example:
color:blue; text-align:center; |
theme | The color theme to use. ‘a’ is black, ‘b’ is blue, ‘c’ is normal. Other letters can be custom defined. jQuery Mobile only. |
top | Position of the top of the control, in pixels, percent or 'auto'. |
width | The width of the control, in pixels, percent or 'auto'. |
Visible | Gets or sets whether control is visible. For iOS6, use ctrl.style.Visible. Can be True or False. |
* Not available for all controls. Not implemented on all devices.
** Not recognized by ontouch events. Check for disabled state in event code and handle there.