Difference between revisions of "UI Control"
m (1 revision) |
|
(No difference)
|
Revision as of 19:01, 23 February 2015
Contents
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.