Dgs-dxtab: Difference between revisions
Line 48: | Line 48: | ||
===tabImage=== | ===tabImage=== | ||
This property determines the image of the tab button. Different from '''bgImage''' | This property determines the image of the tab button, if this is not set, [[dgs-dxtab#tabImage|tabImage of tab panel]] . Different from '''bgImage''' | ||
<syntaxhighlight lang="lua">dgsSetProperty(tab,"tabImage",{defaultImage,hoveringImage,selectedImage})</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(tab,"tabImage",{defaultImage,hoveringImage,selectedImage})</syntaxhighlight> | ||
*'''defaultImage:''' A material element of the normal tab button. ( Passing a nil value can disable this option ) | *'''defaultImage:''' A material element of the normal tab button. ( Passing a nil value can disable this option ) |
Revision as of 07:28, 7 May 2022
DGS Properties is always used to change the gui style and make it more fantastic.
This page shows the properties of dgs-dxtab that you could use.
Main Functions
Properties
bgColor
This property determines the default background color of the tab in the tab panel. Different from tabColor
dgsSetProperty(tabpanel,"bgColor",bgColor)
- bgColor: An integer of the color that can be converted by tocolor.
bgImage
This property determines the default background image of the tab in the tab panel. Different from tabImage
dgsSetProperty(tab,"bgImage",bgImage)
- bgImage: A material element that serves as the background image of the tab. ( Passing a nil value can disable this option )
font
This property determines the default font of tabs. This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText
dgsSetProperty(tab,"font",font)
- font: A dx font element of the default text font of the tab panel.
id
Tis property stores the id of the tab.
dgsSetProperty(tab,"id",id)
- id : The id of the tab.
parent
This property stores the parent tab panel of tab.
dgsSetProperty(tab,"parent",parent)
- parent: The tab panel parent
shadow
The shadow text of the tab. If not specified, shadow of tabpanel will be used.
dgsSetProperty(tab,"shadow",{offsetX,offsetY,color})
- offsetX: A float of the 2D X offset of the shadow text of the tab.
- offsetY: A float of the 2D Y offset of the shadow text of the tab.
- color: An integer of the color of the shadow text of the tab.
tabColor
This property determines the color of the tab button, if this is not set, tabColor of tab panel will be used. Different from bgColor
dgsSetProperty(tab,"tabColor",{defaultColor,hoveringColor,selectedColor})
- defaultColor: An integer of the color of the normal tab button.
- hoveringColor: An integer of the color of the tab button which is hovered on.
- selectedColor: An integer of the color of the tab button which is selected.
tabImage
This property determines the image of the tab button, if this is not set, tabImage of tab panel . Different from bgImage
dgsSetProperty(tab,"tabImage",{defaultImage,hoveringImage,selectedImage})
- defaultImage: A material element of the normal tab button. ( Passing a nil value can disable this option )
- hoveringImage: A material element of the tab button which is hovered on. ( Passing a nil value can disable this option )
- selectedImage: A material element of the tab button which is selected. ( Passing a nil value can disable this option )
text
This is equivalent to dgsSetText/dgsGetText.
dgsSetProperty(tab,"text",text)
- text : A string of the text of the tab button.
textColor
The color which can be translated by tocolor of the text of the tab button.
Usage 1:
dgsSetProperty(tab,"textColor",textColor)
- textColor: An integer of the color of the text of the tab button.
Usage 2:
dgsSetProperty(tab,"textColor",{ColorNormal,ColorHover,ColorClick})
- ColorNormal: An integer of the color of the text under normal state.
- ColorHover: An integer of the color of the text under hovering state.
- ColorClick: An integer of the color of the text under clicked state.
textSize
The scale of the text of the tab button. Learn More dxDrawText
dgsSetProperty(tab,"textSize",{scaleX,scaleY})
- scaleX : A float of the 2D X scale of the text of the tab button.
- scaleY : A float of the 2D Y scale of the text of the tab button.
width
This property stores the width of the tab (exclude tab gap).
dgsSetProperty(tab,"width",width)
- width: An integer indicates the width of the tab in pixels
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