Dgs-dxtabpanel: Difference between revisions
No edit summary |
|||
Line 28: | Line 28: | ||
<syntaxhighlight lang="lua">dgsSetProperty(tabpanel,"font",font)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(tabpanel,"font",font)</syntaxhighlight> | ||
*'''font:''' A dx font element of the default text font of the tab panel. | *'''font:''' A dx font element of the default text font of the tab panel. | ||
===tabAlignment=== | |||
This property determines the alignment of all tabs. | |||
<syntaxhighlight lang="lua">dgsSetProperty(tabpanel,"tabAlignment",tabAlignment)</syntaxhighlight> | |||
*'''tabAlignment:''' A string determines the alignment of all tabs (NOT The Text Alignment). Available values are as follows: | |||
**'''"left"''': | |||
**'''"center"''': | |||
**'''"right"''': | |||
===tabOffset=== | |||
This property determines the offset of all tabs. | |||
<syntaxhighlight lang="lua">dgsSetProperty(tabpanel,"tabOffset",{tabOffset,relative})</syntaxhighlight> | |||
*'''tabPadding:''' An number of the offset of all tabs. | |||
*'''relative:''' A bool of the relative state of all tabs' offset. | |||
===tabPadding=== | ===tabPadding=== |
Revision as of 04:28, 6 February 2021
DGS Properties is always used to change the gui style and make it more fantastic.
This page shows the properties of dgs-dxtabpanel that you could use.
Main Functions
Properties
bgColor
This property determines the default background color of the tab panel.
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 panel.
dgsSetProperty(tabpanel,"bgImage",bgImage)
- bgImage: A material element that serves as the background image of the tab panel (texture/shader/screen source/renderTarget).
tabHeight
This property determines the height of tab.
dgsSetProperty(tabpanel,"tabHeight",{tabHeight,relative})
- tabHeight: A number of the height of the tab.
- relative: A bool of the relative state of the tab height.
font
This property determines the default font of tabs. This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText
dgsSetProperty(tabpanel,"font",font)
- font: A dx font element of the default text font of the tab panel.
tabAlignment
This property determines the alignment of all tabs.
dgsSetProperty(tabpanel,"tabAlignment",tabAlignment)
- tabAlignment: A string determines the alignment of all tabs (NOT The Text Alignment). Available values are as follows:
- "left":
- "center":
- "right":
tabOffset
This property determines the offset of all tabs.
dgsSetProperty(tabpanel,"tabOffset",{tabOffset,relative})
- tabPadding: An number of the offset of all tabs.
- relative: A bool of the relative state of all tabs' offset.
tabPadding
This property determines the distance between the horizontal border of tabs to its text's bounding box.
dgsSetProperty(tabpanel,"tabPadding",{tabPadding,relative})
- tabPadding: An number of the padding of the tab.
- relative: A bool of the relative state of the tab padding.
tabGapSize
This property determines the distance between two tabs.
dgsSetProperty(tabpanel,"tabGapSize",{tabGapSize,relative})
- tabGapSize: An number of distance between two tabs.
- relative: A bool of the relative state of the tab gap size.
tabLengthAll
This property stores the length of all tabs (You may crash tab panel if you modify this property).
dgsSetProperty(tabpanel,"tabLengthAll",tabLengthAll)
- tabLengthAll: A integer of the length of all tabs in pixels.
showPos
This property stores the value of how many pixels does the tabs scroll to left.
dgsSetProperty(tabpanel,"showPos",showPos)
- showPos: A integer of how many pixels does the tabs scroll to left.
scrollSpeed
If you created a lot of tabs in tab panel, you can scroll your wheel on the tabs to view the tabs that are out of range.
This property determines the scroll speed.
dgsSetProperty(tabpanel,"scrollSpeed",{scrollSpeed,relative})
- scrollSpeed: A number of scroll speed depends on relative.
- relative: A bool of the relative state of the scrollSpeed.[false: pixels/scroll,true: ratio/scroll]
tabMaxWidth
This property restricts the maximum width of the tab.
dgsSetProperty(tabpanel,"tabMaxWidth",{tabMaxWidth,relative})
- tabMaxWidth: A number of the maximum width of the tab.
- relative: A bool of the relative state of the tabMaxWidth.
tabMinWidth
This property restricts the minimum width of the tab.
dgsSetProperty(tabpanel,"tabMinWidth",{tabMinWidth,relative})
- tabMinWidth: A number of the minimum width of the tab.
- relative: A bool of the relative state of the tabMinWidth.
selected
This property stores the index of selected tab.
dgsSetProperty(tabpanel,"selected",selected)
- selected: A number of the index of selected tab.
renderTarget
This property stores the render target that is used to render the tab button.
dgsSetProperty(tabpanel,"renderTarget",renderTarget)
- renderTarget: A render target.
preSelect
This property stores the index of the tab which your mouse is hovering on.
dgsSetProperty(tabpanel,"preSelect",preSelect)
- preSelect: A number of the index of the tab which your mouse is hovering on.
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