Dgs-dxcheckbox: Difference between revisions
No edit summary |
No edit summary |
||
(15 intermediate revisions by 2 users not shown) | |||
Line 20: | Line 20: | ||
*'''alignY:''' Vertical alignment of the text within the checkbox. Can be "top", "center" or "bottom". | *'''alignY:''' Vertical alignment of the text within the checkbox. Can be "top", "center" or "bottom". | ||
=== | ===buttonAlignment=== | ||
This property determines the | This property determines alignment of the button of the check box. | ||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox," | |||
*''' | The functions as follows are basic on this property. | ||
*''' | |||
*''' | [[dgsCheckBoxSetButtonAlign]]/[[dgsCheckBoxGetButtonAlign]] | ||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"buttonAlignment",buttonAlignment)</syntaxhighlight> | |||
*'''buttonAlignment''' A string indicates the alignment of the button of check box. Can be "left" or "right". | |||
===buttonSide=== | |||
This property determines side of the button of the check box. | |||
The functions as follows are basic on this property. | |||
[[dgsCheckBoxSetButtonSide]]/[[dgsCheckBoxGetButtonSide]] | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"buttonSide",buttonSide)</syntaxhighlight> | |||
*'''buttonSide''' A string indicates the side of the button of check box. Can be "left" or "right". | |||
===buttonSize=== | |||
This property determines the button size of the check box. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"buttonSize",{size,relative})</syntaxhighlight> | |||
*'''size:''' A number of the size of the button on screen. | |||
*'''relative:''' A bool indicates whether the size is relative or absolute. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"buttonSize",{width,height,relative})</syntaxhighlight> | |||
*'''width:''' A number of the width of the button on screen. | |||
*'''height:''' A number of the height of the button on screen. | |||
*'''relative:''' A bool indicates whether the size is relative or absolute. | |||
=== | ===clip=== | ||
Whether the clip property is enabled or not. ''Learn More [[dxDrawText]]'' | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox," | <syntaxhighlight lang="lua">dgsSetProperty(checkbox,"clip",clip)</syntaxhighlight> | ||
*''' | *'''clip:''' If set to true, the parts of the text that don't fit within the bounding box will be cut off. | ||
=== | ===colorIndeterminate=== | ||
This property determines the icon under 3 conditions when the check box is indeterminate. | This property determines the color of the icon under 3 conditions when the check box is indeterminate. | ||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox," | <syntaxhighlight lang="lua">dgsSetProperty(checkbox,"colorIndeterminate",{ColorNormal,ColorHover,ColorClick})</syntaxhighlight> | ||
*''' | *'''ColorNormal:''' An integer of the color of the icon under normal state. (indeterminate) | ||
*''' | *'''ColorHover:''' An integer of the color of the icon under hovering state. (indeterminate) | ||
*''' | *'''ColorClick:''' An integer of the color of the icon under clicked state. (indeterminate) | ||
=== | ===colorUnchecked=== | ||
This property determines the color of the icon under 3 conditions when the check box is unchecked. | This property determines the color of the icon under 3 conditions when the check box is unchecked. | ||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox," | <syntaxhighlight lang="lua">dgsSetProperty(checkbox,"colorUnchecked",{ColorNormal,ColorHover,ColorClick})</syntaxhighlight> | ||
*'''ColorNormal:''' An integer of the color of the icon under normal state. (unchecked) | *'''ColorNormal:''' An integer of the color of the icon under normal state. (unchecked) | ||
*'''ColorHover:''' An integer of the color of the icon under hovering state. (unchecked) | *'''ColorHover:''' An integer of the color of the icon under hovering state. (unchecked) | ||
*'''ColorClick:''' An integer of the color of the icon under clicked state. (unchecked) | *'''ColorClick:''' An integer of the color of the icon under clicked state. (unchecked) | ||
=== | ===colorChecked=== | ||
This property determines the color of the icon under 3 conditions when the check box is checked. | This property determines the color of the icon under 3 conditions when the check box is checked. | ||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox," | <syntaxhighlight lang="lua">dgsSetProperty(checkbox,"colorChecked",{ColorNormal,ColorHover,ColorClick})</syntaxhighlight> | ||
*'''ColorNormal:''' An integer of the color of the icon under normal state. (checked) | *'''ColorNormal:''' An integer of the color of the icon under normal state. (checked) | ||
*'''ColorHover:''' An integer of the color of the icon under hovering state. (checked) | *'''ColorHover:''' An integer of the color of the icon under hovering state. (checked) | ||
*'''ColorClick:''' An integer of the color of the icon under clicked state. (checked) | *'''ColorClick:''' An integer of the color of the icon under clicked state. (checked) | ||
=== | ===colorCoded=== | ||
This property determines the | Whether the color code is enabled or not. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox," | <syntaxhighlight lang="lua">dgsSetProperty(checkbox,"colorCoded",colorCoded)</syntaxhighlight> | ||
*''' | *'''colorCoded:''' Set to true to enable embedded #FFFFFF color codes. | ||
*''' | |||
*''' | ===font=== | ||
This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]'' | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"font",font)</syntaxhighlight> | |||
*'''font:''' A string or a [[Element/DX_font|dx font element]] of the text font of the checkbox. | |||
===imageUnchecked=== | |||
This property determines the icon under 3 conditions when the check box is unchecked. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"imageUnchecked",{ImageNormal,ImageHover,ImageClick})</syntaxhighlight> | |||
*'''ImageNormal:''' An image element of the icon under normal state. (unchecked) | |||
*'''ImageHover:''' An image element of the icon under hovering state. (unchecked) | |||
*'''ImageClick:''' An image element of the icon under clicked state. (unchecked) | |||
===imageIndeterminate=== | |||
This property determines the icon under 3 conditions when the check box is indeterminate. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"imageIndeterminate",{ImageNormal,ImageHover,ImageClick})</syntaxhighlight> | |||
*'''ImageNormal:''' An image element of the icon under normal state. (indeterminate) | |||
*'''ImageHover:''' An image element of the icon under hovering state. (indeterminate) | |||
*'''ImageClick:''' An image element of the icon under clicked state. (indeterminate) | |||
===imageChecked=== | |||
This property determines the icon under 3 conditions when the check box is checked. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"imageChecked",{ImageNormal,ImageHover,ImageClick})</syntaxhighlight> | |||
*'''ImageNormal:''' An image element of the icon under normal state. (checked) | |||
*'''ImageHover:''' An image element of the icon under hovering state. (checked) | |||
*'''ImageClick:''' An image element of the icon under clicked state. (checked) | |||
===shadow=== | |||
The shadow text of the checkbox. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"shadow",{offsetX,offsetY,color,outline})</syntaxhighlight> | |||
*'''offsetX:''' A float of the 2D X offset of the shadow text of the checkbox. | |||
*'''offsetY:''' A float of the 2D Y offset of the shadow text of the checkbox. | |||
*'''color:''' An integer of the color of the shadow text of the checkbox. | |||
*'''outline:''' A bool of the outline state of the shadow text. | |||
===state=== | |||
This property stores the state of the check box. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"state",state)</syntaxhighlight> | |||
*'''state:''' A bool/nil of the state. Values can be as follows: | |||
**'''true:''' Checked | |||
**'''false:''' Unchecked | |||
**'''nil:''' indeterminate | |||
===text=== | ===text=== | ||
Line 71: | Line 131: | ||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"textColor",textColor)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(checkbox,"textColor",textColor)</syntaxhighlight> | ||
*'''textColor:''' An integer of the color of the text of the checkbox. | *'''textColor:''' An integer of the color of the text of the checkbox. | ||
===textOffset=== | |||
The offset of the title text of check box. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"textOffset",{offsetX,offsetY,relative})</syntaxhighlight> | |||
*'''offsetX''' : A float of the 2D X offset relative to the position of the text of check box, depends on '''relative'''. | |||
*'''offsetY''' : A float of the 2D Y offset relative to the position of the text of check box, depends on '''relative'''. | |||
*'''relative''' : A bool of whether the offset is relative or absolute. | |||
===textPadding=== | |||
This property determines the padding between the text and icon. | |||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"textPadding",textPadding)</syntaxhighlight> | |||
*'''textPadding''' A float of the distance from the icon to the text of the check box. | |||
===textSize=== | ===textSize=== | ||
Line 78: | Line 150: | ||
*'''scaleY:''' A float of the 2D Y scale of the text of the checkbox. | *'''scaleY:''' A float of the 2D Y scale of the text of the checkbox. | ||
=== | ===wordBreak=== | ||
Whether the word-break is enabled or not. ''Learn More [[dxDrawText]]'' | Whether the word-break is enabled or not. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty(checkbox," | <syntaxhighlight lang="lua">dgsSetProperty(checkbox,"wordBreak",wordBreak)</syntaxhighlight> | ||
*''' | *'''wordBreak:''' If set to true, the text will wrap to a new line whenever it reaches the right side of the bounding box. If false, the text will always be completely on one line. | ||
=== | ==See Also== | ||
{{DGSPROPERTIES}} | |||
Latest revision as of 16:03, 5 February 2023
DGS Properties is always used to change the gui style and make it more fantastic.
This page shows the properties of dgs-dxcheckbox that you could use.
Main Functions
Properties
alignment
Alignment of the text within the checkbox.
The functions as follows are basic on this property.
dgsCheckBoxSetHorizontalAlign/dgsCheckBoxGetHorizontalAlign
dgsCheckBoxSetVerticalAlign/dgsCheckBoxGetVerticalAlign
dgsSetProperty(checkbx,"alignment",{alignX,alignY})
- alignX: Horizontal alignment of the text within the checkbox. Can be "left", "center" or "right".
- alignY: Vertical alignment of the text within the checkbox. Can be "top", "center" or "bottom".
buttonAlignment
This property determines alignment of the button of the check box.
The functions as follows are basic on this property.
dgsCheckBoxSetButtonAlign/dgsCheckBoxGetButtonAlign
dgsSetProperty(checkbox,"buttonAlignment",buttonAlignment)
- buttonAlignment A string indicates the alignment of the button of check box. Can be "left" or "right".
buttonSide
This property determines side of the button of the check box.
The functions as follows are basic on this property.
dgsCheckBoxSetButtonSide/dgsCheckBoxGetButtonSide
dgsSetProperty(checkbox,"buttonSide",buttonSide)
- buttonSide A string indicates the side of the button of check box. Can be "left" or "right".
buttonSize
This property determines the button size of the check box.
dgsSetProperty(checkbox,"buttonSize",{size,relative})
- size: A number of the size of the button on screen.
- relative: A bool indicates whether the size is relative or absolute.
dgsSetProperty(checkbox,"buttonSize",{width,height,relative})
- width: A number of the width of the button on screen.
- height: A number of the height of the button on screen.
- relative: A bool indicates whether the size is relative or absolute.
clip
Whether the clip property is enabled or not. Learn More dxDrawText
dgsSetProperty(checkbox,"clip",clip)
- clip: If set to true, the parts of the text that don't fit within the bounding box will be cut off.
colorIndeterminate
This property determines the color of the icon under 3 conditions when the check box is indeterminate.
dgsSetProperty(checkbox,"colorIndeterminate",{ColorNormal,ColorHover,ColorClick})
- ColorNormal: An integer of the color of the icon under normal state. (indeterminate)
- ColorHover: An integer of the color of the icon under hovering state. (indeterminate)
- ColorClick: An integer of the color of the icon under clicked state. (indeterminate)
colorUnchecked
This property determines the color of the icon under 3 conditions when the check box is unchecked.
dgsSetProperty(checkbox,"colorUnchecked",{ColorNormal,ColorHover,ColorClick})
- ColorNormal: An integer of the color of the icon under normal state. (unchecked)
- ColorHover: An integer of the color of the icon under hovering state. (unchecked)
- ColorClick: An integer of the color of the icon under clicked state. (unchecked)
colorChecked
This property determines the color of the icon under 3 conditions when the check box is checked.
dgsSetProperty(checkbox,"colorChecked",{ColorNormal,ColorHover,ColorClick})
- ColorNormal: An integer of the color of the icon under normal state. (checked)
- ColorHover: An integer of the color of the icon under hovering state. (checked)
- ColorClick: An integer of the color of the icon under clicked state. (checked)
colorCoded
Whether the color code is enabled or not. Learn More dxDrawText
dgsSetProperty(checkbox,"colorCoded",colorCoded)
- colorCoded: Set to true to enable embedded #FFFFFF color codes.
font
This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText
dgsSetProperty(checkbox,"font",font)
- font: A string or a dx font element of the text font of the checkbox.
imageUnchecked
This property determines the icon under 3 conditions when the check box is unchecked.
dgsSetProperty(checkbox,"imageUnchecked",{ImageNormal,ImageHover,ImageClick})
- ImageNormal: An image element of the icon under normal state. (unchecked)
- ImageHover: An image element of the icon under hovering state. (unchecked)
- ImageClick: An image element of the icon under clicked state. (unchecked)
imageIndeterminate
This property determines the icon under 3 conditions when the check box is indeterminate.
dgsSetProperty(checkbox,"imageIndeterminate",{ImageNormal,ImageHover,ImageClick})
- ImageNormal: An image element of the icon under normal state. (indeterminate)
- ImageHover: An image element of the icon under hovering state. (indeterminate)
- ImageClick: An image element of the icon under clicked state. (indeterminate)
imageChecked
This property determines the icon under 3 conditions when the check box is checked.
dgsSetProperty(checkbox,"imageChecked",{ImageNormal,ImageHover,ImageClick})
- ImageNormal: An image element of the icon under normal state. (checked)
- ImageHover: An image element of the icon under hovering state. (checked)
- ImageClick: An image element of the icon under clicked state. (checked)
shadow
The shadow text of the checkbox.
dgsSetProperty(checkbox,"shadow",{offsetX,offsetY,color,outline})
- offsetX: A float of the 2D X offset of the shadow text of the checkbox.
- offsetY: A float of the 2D Y offset of the shadow text of the checkbox.
- color: An integer of the color of the shadow text of the checkbox.
- outline: A bool of the outline state of the shadow text.
state
This property stores the state of the check box.
dgsSetProperty(checkbox,"state",state)
- state: A bool/nil of the state. Values can be as follows:
- true: Checked
- false: Unchecked
- nil: indeterminate
text
This is equivalent to dgsSetText/dgsGetText.
dgsSetProperty(checkbox,"text",text)
- text: A string of the text of the checkbox.
textColor
The color which can be translated by tocolor of the text of the checkbox.
dgsSetProperty(checkbox,"textColor",textColor)
- textColor: An integer of the color of the text of the checkbox.
textOffset
The offset of the title text of check box.
dgsSetProperty(checkbox,"textOffset",{offsetX,offsetY,relative})
- offsetX : A float of the 2D X offset relative to the position of the text of check box, depends on relative.
- offsetY : A float of the 2D Y offset relative to the position of the text of check box, depends on relative.
- relative : A bool of whether the offset is relative or absolute.
textPadding
This property determines the padding between the text and icon.
dgsSetProperty(checkbox,"textPadding",textPadding)
- textPadding A float of the distance from the icon to the text of the check box.
textSize
The scale of the text of the checkbox. Learn More dxDrawText
dgsSetProperty(checkbox,"textSize",{scaleX,scaleY})
- scaleX: A float of the 2D X scale of the text of the checkbox.
- scaleY: A float of the 2D Y scale of the text of the checkbox.
wordBreak
Whether the word-break is enabled or not. Learn More dxDrawText
dgsSetProperty(checkbox,"wordBreak",wordBreak)
- wordBreak: If set to true, the text will wrap to a new line whenever it reaches the right side of the bounding box. If false, the text will always be completely on one line.
See Also
General Properties
Unique Properties For DGS Core Elements
- dgs-dx3dinterface
- dgs-dx3dimage
- dgs-dx3dtext
- dgs-dx3dline
- dgs-dxbutton
- dgs-dxcheckbox
- dgs-dxcombobox
- dgs-dxdetectarea
- dgs-dxedit
- dgs-dxgridlist
- dgs-dximage
- dgs-dxlabel
- dgs-dxline
- dgs-dxmemo
- dgs-dxprogressbar
- dgs-dxradiobutton
- dgs-dxscrollbar
- dgs-dxscrollpane
- dgs-dxselector
- dgs-dxswitchbutton
- dgs-dxtabpanel
- dgs-dxtab
- dgs-dxwindow