Generic: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(11 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
The Generic control is an HTML wrapper which you can use to create your own control or element. Using it will require some knowledge of HTML. Once you have set the options, the result will be a fully | '''This control is deprecated in AppStudio 5. Use the [[Container]] control instead.''' | ||
The Generic control is an HTML wrapper which you can use to create your own control or element. Using it will require some knowledge of HTML. Once you have set the options, the result will be a fully functional AppStudio control. | |||
All the usual [[events]] are supported. | All the usual [[events]] are supported. | ||
Line 14: | Line 16: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| attributes || A list of [http://en.wikipedia.org/wiki/HTML_attribute HTML attributes]. To prevent jQuery Mobile from styling the element, use data-role=none. Attributes are separated by spaces. | | attributes || A list of [http://en.wikipedia.org/wiki/HTML_attribute HTML attributes]. To prevent jQuery Mobile from styling the element, use data-role=none. Attributes are separated by spaces. Design time. | ||
|- | |- | ||
| class || | | class || List of CSS classes to apply to the element. Class names are separated by spaces. Design time. | ||
|- | |- | ||
| content || The text to use in between the HTML tags. Can be text or HTML. | | content || The text to use in between the HTML tags. Can be text or HTML. Design time. | ||
|- | |- | ||
| HTMLTag || The [http://www.w3schools.com/tags/ HTML tag] of the control. | | HTMLTag || The [http://www.w3schools.com/tags/ HTML tag] of the control. Common values are div, button, text, ol, etc. For example. if value is 'button', then this HTML will be created: <button>''content''</button>. Design time. | ||
|- | |- | ||
| style || A list of [[style]] properties, each in the form styleName:value; | | style || A list of [[style]] properties, each in the form styleName:value; Example: "height:40px; width:100px".Design time. | ||
|} | |} | ||
=== Change the color of | == Events == | ||
Standard [[events|events]] are supported. | |||
== Examples == | |||
=== Change the color of the text === | |||
<pre> | <pre> | ||
Generic1.style.color = "red" | Generic1.style.color = "red" | ||
</pre> | </pre> | ||
[[Category:Language Reference]] | [[Category:Language Reference]] |
Latest revision as of 19:26, 6 April 2015
Description
This control is deprecated in AppStudio 5. Use the Container control instead.
The Generic control is an HTML wrapper which you can use to create your own control or element. Using it will require some knowledge of HTML. Once you have set the options, the result will be a fully functional AppStudio control.
All the usual events are supported.
To add a Generic control to your app, choose the Generic icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need.
Properties
Standard properties are supported, plus:
attributes | A list of HTML attributes. To prevent jQuery Mobile from styling the element, use data-role=none. Attributes are separated by spaces. Design time. |
class | List of CSS classes to apply to the element. Class names are separated by spaces. Design time. |
content | The text to use in between the HTML tags. Can be text or HTML. Design time. |
HTMLTag | The HTML tag of the control. Common values are div, button, text, ol, etc. For example. if value is 'button', then this HTML will be created: <button>content</button>. Design time. |
style | A list of style properties, each in the form styleName:value; Example: "height:40px; width:100px".Design time. |
Events
Standard events are supported.
Examples
Change the color of the text
Generic1.style.color = "red"