Dgs-dxradiobutton: Difference between revisions
Line 56: | Line 56: | ||
*'''ImageClick:''' An image element of the icon under clicked state. (unchecked) | *'''ImageClick:''' An image element of the icon under clicked state. (unchecked) | ||
=== | ===imageChecked=== | ||
This property determines the icon under 3 conditions when the radio button is checked. | This property determines the icon under 3 conditions when the radio button is checked. | ||
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton," | <syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"imageChecked",{ImageNormal,ImageHover,ImageClick})</syntaxhighlight> | ||
*'''ImageNormal:''' An image element of the icon under normal state. (checked) | *'''ImageNormal:''' An image element of the icon under normal state. (checked) | ||
*'''ImageHover:''' An image element of the icon under hovering state. (checked) | *'''ImageHover:''' An image element of the icon under hovering state. (checked) |
Revision as of 17:52, 16 March 2022
DGS Properties is always used to change the gui style and make it more fantastic.
This page shows the properties of dgs-dxradiobutton that you could use.
Main Functions
Properties
alignment
Alignment of the text within the radiobutton.
The functions as follows are basic on this property.
dgsRadioButtonSetHorizontalAlign/dgsRadioButtonGetHorizontalAlign
dgsRadioButtonSetVerticalAlign/dgsRadioButtonGetVerticalAlign
dgsSetProperty(checkbx,"alignment",{alignX,alignY})
- alignX: Horizontal alignment of the text within the radiobutton. Can be "left", "center" or "right".
- alignY: Vertical alignment of the text within the radiobutton. Can be "top", "center" or "bottom".
clip
Whether the clip property is enabled or not. Learn More dxDrawText
dgsSetProperty(radiobutton,"clip",clip)
- clip: If set to true, the parts of the text that don't fit within the bounding box will be cut off.
colorUnchecked
This property determines the color of the icon under 3 conditions when the radio button is unchecked.
dgsSetProperty(radiobutton,"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 radio button is checked.
dgsSetProperty(radiobutton,"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(radiobutton,"colorCoded",colorCoded)
- colorCoded: Set to true to enable embedded #FFFFFF color codes.
font
This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText
dgsSetProperty(radiobutton,"font",font)
- font: A string or a dx font element of the text font of the radiobutton.
imageUnchecked
This property determines the icon under 3 conditions when the radio button is unchecked.
dgsSetProperty(radiobutton,"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)
imageChecked
This property determines the icon under 3 conditions when the radio button is checked.
dgsSetProperty(radiobutton,"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 radiobutton.
dgsSetProperty(radiobutton,"shadow",{offsetX,offsetY,color,outline})
- offsetX: A float of the 2D X offset of the shadow text of the radiobutton.
- offsetY: A float of the 2D Y offset of the shadow text of the radiobutton.
- color: An integer of the color of the shadow text of the radiobutton.
- outline: A bool of the outline state of the shadow text.
text
This is equivalent to dgsSetText/dgsGetText.
dgsSetProperty(radiobutton,"text",text)
- text: A string of the text of the radiobutton.
textColor
The color which can be translated by tocolor of the text of the radiobutton.
dgsSetProperty(radiobutton,"textColor",textColor)
- textColor: An integer of the color of the text of the radiobutton.
textPadding
This property determines the padding between the text and icon.
dgsSetProperty(radiobutton,"textPadding",textPadding)
- textPadding: A float of the distance from the icon to the text of the radio button.
textSize
The scale of the text of the radiobutton. Learn More dxDrawText
dgsSetProperty(radiobutton,"textSize",{scaleX,scaleY})
- scaleX: A float of the 2D X scale of the text of the radiobutton.
- scaleY: A float of the 2D Y scale of the text of the radiobutton.
wordBreak
Whether the word-break is enabled or not. Learn More dxDrawText
dgsSetProperty(radiobutton,"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.
Additional Property For Parent Element
RadioButton
This property stores which radio button is selected.
dgsSetProperty(parent,"RadioButton",RadioButton)
- RadioButton: The radio button that is selected.
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