Dgs-dxedit
DGS Properties is always used to change the gui style and make it more fantastic.
This page shows the properties of dgs-dxedit that you could use.
Main Functions
Properties
bgcolor
This property determines the background color of the edit.
dgsSetProperty(edit,"bgcolor",bgcolor)
- bgcolor : An integer of the color that can be converted by tocolor.
bgimage
This property determines the background image of the edit.
dgsSetProperty(edit,"bgimage",bgimage)
- bgimage : A material element that serves as the background image of the edit (texture/shader/screen source/renderTarget).
cursorpos
The position where the caret stays.
dgsSetProperty(edit,"cursorpos",index)
- index : An integer of the index of the text that the caret stays.
text
This is equivalent to dgsSetText/dgsGetText.
dgsSetProperty(edit,"text",text)
- text : A table of the text of the edit.( Because of multi lines, I use table instead of string )
maxLength
This is equivalent to dgsEditGetMaxLength/dgsEditSetMaxLength
dgsSetProperty(edit,"maxLength",maxLength)
- maxLength : An integer indicating the maximum number of characters that can be typed into the edit box.
textcolor
The color which can be translated by tocolor of the text of the edit.
dgsSetProperty(edit,"textcolor",textcolor)
- textcolor : An integer of the color of the text of the edit.
textsize
The scale of the text of the edit. Learn More dxDrawText
dgsSetProperty(edit,"textsize",{scaleX,scaleY})
- scaleX : A float of the 2D X scale of the text of the edit.
- scaleY : A float of the 2D Y scale of the text of the edit.
masked
This is equivalent to dgsEditSetMasked/dgsEditGetMasked
dgsSetProperty(edit,"masked",masked)
- masked : A boolean value indicating whether masking is to be enabled or disabled.
maskText
This property determines what the masked text will be, and the default is "*".
dgsSetProperty(edit,"maskText",maskText)
- maskText : A string that the masked text will be.
selectfrom
The position from which the text is selected.
dgsSetProperty(edit,"selectfrom",{index,line})
- index : An integer of the index of the text that selected from.
font
This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText
dgsSetProperty(edit,"font",font)
- font : A dx font element of the text font of the edit.
showPos
The min value of the x position of the text of the edit starts to show in the render target. ( I don't know how to explain it. XD )
dgsSetProperty(edit,"showPos",posX)
- posX : An integer indicates how many pixels of the text are moved to left.
cursorStyle
This is equivalent to dgsEditSetCaretStyle/dgsEditGetCaretStyle.
This property allows us to change the style of caret of the edit. ( 0 is "|"; 1 is "_" )
Example(0):
This is Text|
Example(1):
This is Text_
dgsSetProperty(edit,"cursorStyle",cursorStyle)
- cursorStyle : An integer of the caret style of the edit.
cursorThick
This property allows us to change the thickness of caret of the edit.
dgsSetProperty(edit,"cursorThick",cursorThick)
- cursorThick : An integer of the thickness of the caret of the edit.
cursorOffset
The offset of the caret of the edit.
dgsSetProperty(edit,"cursorOffset",{offsetX,offsetY})
- offsetX : A float of the 2D X position offset of the caret of the edit.
- offsetY : A float of the 2D Y position offset of the caret of the edit.
caretColor
This property determines the color of the caret
dgsSetProperty(edit,"caretColor",caretColor)
- caretColor : An integer of the color that can be converted by tocolor.
readOnly
This is equivalent to dgsEditSetReadOnly/dgsEditGetReadOnly.
dgsSetProperty(edit,"readOnly",readOnly)
- readOnly : A bool indicates whether the edit is only readable.
readOnlyCaretShow
Whether the caret of edit will show/hide under read-only mode.
dgsSetProperty(edit,"readOnlyCaretShow",readOnlyCaretShow)
- readOnlyCaretShow : A bool indicates whether the caret is shown or hidden when the edit is read-only.
side
The border size of the edit.
dgsSetProperty(edit,"side",side)
- side : A float of the border size of the edit.
sidecolor
The border color which can be translated by tocolor of the edit.
dgsSetProperty(edit,"sidecolor",sidecolor)
- sidecolor : An integer of the color of the border of the edit.
selectcolor
The color which can be translated by tocolor of the rectangle of test selection of the edit.
dgsSetProperty(edit,"selectcolor",selectcolor)
- selectcolor : An integer of the color of the rectangle of test selection of the edit.
sideWhite
This property determines how far is it between the border of the edit and text.
dgsSetProperty(edit,"sideWhite",sideWhite)
- selectcolor : An integer indicates how far is it between the border of the edit and text.
edit
This property stores a gui-edit which is used to input characters.
dgsSetProperty(edit,"edit",gedit)
- gedit : A gui-edit.
renderTarget
This property stores a render target of the edit.
dgsSetProperty(edit,"renderTarget",renderTarget)
- renderTarget : A render target that is used to render the text.
enableTabSwitch
This property determines whether we can use the key "tab" to switch to another edit.
dgsSetProperty(edit,"enableTabSwitch",enableTabSwitch)
- enableTabSwitch : A bool indicates whether we can use the key tab to switch to another edit.
clearSelection
This property determines whether the text selection will be cleared when the edit blurs.
dgsSetProperty(edit,"clearSelection",clearSelection)
- clearSelection : A bool indicates whether the text selection will be cleared when the edit blurs.
caretHeight
This property determines what's the height of the caret.
dgsSetProperty(edit,"caretHeight",caretHeight)
- caretHeight : A bool indicates what's the height of the caret.
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