Difference between revisions of "UI Control"

From Jeremie Leroy - XOJO Controls Wiki
Jump to: navigation, search
 
m (13 revisions imported)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
 +
===Desktop Framework===
 +
Each UI_Control (UI_Button, UI_Slider, UI_TextArea...) is a replacement of the native Controls included in the Xojo Desktop Framework.
 +
 +
Each control has the same Events, Methods and Properties from the native Controls.
 +
 +
===Web Framework===
 +
Each UI_Control (UI_Button, UI_Slider, UI_TextArea...) is a subclass and replacement of the native WebControls included in the Xojo Web Framework.
 +
 +
Each control keeps the same Events, Methods and Properties from the native WebControls.
 +
 +
===Both Frameworks===
 +
 +
The only accessible addition for each UI_Control is the MyStyle property, that holds a structure for the Style to apply to the control.
  
  
{| class=eventTable
 
|-
 
|class=titleClass colspan=1|Events
 
|-
 
|{{Event | name=Open | description= | newinversion=}}
 
|-
 
  
|-
 
|}
 
  
  
Line 17: Line 22:
 
|class=titleClass colspan=1|Properties
 
|class=titleClass colspan=1|Properties
 
|-
 
|-
|{{Property | name=BackColor | type=Color | description= | readonly=no | newinversion= | version=1}}
+
|{{Property | name=MyStyle | type=UIStyle | description= | readonly=no | newinversion= | version=1}}
 
|-
 
|-
|{{Property | name=FullRefresh | type=Boolean | description= | readonly=no | newinversion= | version=1}}
+
 
 
|-
 
|-
|{{Property | name=HasBackColor | type=Boolean | description= | readonly=no | newinversion= | version=1}}
+
|}
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
==Class Constants==
 +
 
 +
===BackgroundType===
 +
The following class constants can be used to specify the value of BackgroundType and all other MyStyle.XXType properties.
 +
{| class="genericTable"
 +
! width=15% | Class Constant
 +
! width=55% | Description
 
|-
 
|-
|{{Property | name=SpecialStyle | type=String | description= | readonly=no | newinversion= | version=1}}
+
|FillSolid
 +
|Element background will have a solid color, using XXColor1
 
|-
 
|-
 
+
|FillGradientVertical
 +
|Element background will have a vertical gradient using XXColor1 and XXColor2
 
|-
 
|-
 +
|FillGradientHorizontal
 +
|Element background will have a horizontal gradient using XXColor1 and XXColor2
 +
|-
 +
|FillTexture
 +
|Element background is a picture defined by XXTexture. The picture is tiled (repeated)
 
|}
 
|}
 +
 +
==Changing the Style of a Control==
 +
 +
 +
Changing the style of a single control can be done in the Open event of the Control.
 +
 +
For example:<br>
 +
<code>me.MyStyle.Arc = 99</code><br>
 +
Will change the border radius of the control to 99 pixels (a round corner).
 +
 +
All other controls with the same type will keep the default style.
 +
==UIStyle Structure==
 +
 +
 +
Detailed information of [[UI_Control.UIStyle]] on a dedicated page.
 +
==See also==
 +
 +
[[CustomUI]], [[WebCustomUI]], [[UI_GroupBox]]

Latest revision as of 16:25, 7 August 2015

Desktop Framework

Each UI_Control (UI_Button, UI_Slider, UI_TextArea...) is a replacement of the native Controls included in the Xojo Desktop Framework.

Each control has the same Events, Methods and Properties from the native Controls.

Web Framework

Each UI_Control (UI_Button, UI_Slider, UI_TextArea...) is a subclass and replacement of the native WebControls included in the Xojo Web Framework.

Each control keeps the same Events, Methods and Properties from the native WebControls.

Both Frameworks

The only accessible addition for each UI_Control is the MyStyle property, that holds a structure for the Style to apply to the control.



Properties
MyStyle




Class Constants

BackgroundType

The following class constants can be used to specify the value of BackgroundType and all other MyStyle.XXType properties.

Class Constant Description
FillSolid Element background will have a solid color, using XXColor1
FillGradientVertical Element background will have a vertical gradient using XXColor1 and XXColor2
FillGradientHorizontal Element background will have a horizontal gradient using XXColor1 and XXColor2
FillTexture Element background is a picture defined by XXTexture. The picture is tiled (repeated)

Changing the Style of a Control

Changing the style of a single control can be done in the Open event of the Control.

For example:
me.MyStyle.Arc = 99
Will change the border radius of the control to 99 pixels (a round corner).

All other controls with the same type will keep the default style.

UIStyle Structure

Detailed information of UI_Control.UIStyle on a dedicated page.

See also

CustomUI, WebCustomUI, UI_GroupBox