Dgs-dxedit: Difference between revisions
(29 intermediate revisions by 3 users not shown) | |||
Line 8: | Line 8: | ||
==Properties== | ==Properties== | ||
=== | ===alignment=== | ||
Alignment of the text within the edit. | |||
The functions as follows are basic on this property. | |||
[[dgsEditSetHorizontalAlign]]/[[dgsEditGetHorizontalAlign]] | |||
[[dgsEditSetVerticalAlign]]/[[dgsEditGetVerticalAlign]] | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"alignment",{alignX,alignY})</syntaxhighlight> | |||
*'''alignX''' : Horizontal alignment of the text within the edit. Can be "left", "center" or "right". | |||
*'''alignY''' : Vertical alignment of the text within the edit. Can be "top", "center" or "bottom". | |||
===allowCopy=== | |||
This propertry determines whether the text can be copyed ( ctrl+c ) or cut ( ctrl+x ) | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"allowCopy",allowCopy)</syntaxhighlight> | |||
*'''allowCopy''' : A bool indicates whether the text can be copyed ( ctrl+c ) or cut ( ctrl+x ) | |||
===autoComplete=== | |||
This propertry allows auto complete for edit. ''See'' [[dgsEditAddAutoComplete]]\[[dgsEditRemoveAutoComplete]]\[[dgsEditSetAutoComplete]]\[[dgsEditGetAutoComplete]] | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"autoComplete",autoComplete)</syntaxhighlight> | |||
*'''autoComplete''' : The auto complete table. Structure is as follows: | |||
<syntaxhighlight lang="lua"> | |||
autoComplete = { | |||
name1 = isSensitive, | |||
name2 = isSensitive, | |||
} | |||
</syntaxhighlight> | |||
===autoCompleteSkip=== | |||
This propertry allows skip auto complete detect. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"autoCompleteSkip",autoCompleteSkip)</syntaxhighlight> | |||
*'''autoCompleteSkip''' : A bool if whether disabling auto complete check | |||
===autoCompleteShow=== | |||
This propertry stores current showing auto complete item. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"autoCompleteShow",autoCompleteShow)</syntaxhighlight> | |||
*'''autoCompleteShow''' : A table stores the showing data. Structure is as follows: | |||
<syntaxhighlight lang="lua"> | |||
autoCompleteShow = {matchedAutoCompletion,showingAutoCompletion} | |||
</syntaxhighlight> | |||
'''matchedAutoCompletion''' may be different from '''showingAutoCompletion''' because of case sensitivity. | |||
===bgColor=== | |||
This property determines the background color of the edit. | This property determines the background color of the edit. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"bgColor",bgColor)</syntaxhighlight> | ||
*''' | *'''bgColor''' : An integer of the color that can be converted by [[tocolor]]. | ||
=== | ===bgColorBlur=== | ||
This property determines the background color of the edit when it is blurred. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"bgColorBlur",bgColorBlur)</syntaxhighlight> | |||
*'''bgColorBlur:''' An integer of the color that can be converted by [[tocolor]], leave to nil to use bgImage. | |||
===bgImage=== | |||
This property determines the background image of the edit. | This property determines the background image of the edit. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"bgImage",bgImage)</syntaxhighlight> | ||
*''' | *'''bgImage''' : A material element that serves as the background image of the edit (texture/shader/screen source/renderTarget). | ||
===bgImageBlur=== | |||
This property determines the background image of the edit when it is blurred. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"bgImageBlur",bgImageBlur)</syntaxhighlight> | |||
*'''bgImageBlur:''' A material element that serves as the background image of the edit(texture/shader/screen source/renderTarget), leave to nil to use bgImage. | |||
=== | ===caretColor=== | ||
This property determines the color of the caret | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"caretColor",caretColor)</syntaxhighlight> | |||
*'''caretColor''' : An integer of the color that can be converted by [[tocolor]]. | |||
===caretHeight=== | |||
This property determines what's the height of the caret. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"caretHeight",caretHeight)</syntaxhighlight> | |||
*'''caretHeight''' : A float indicates what's the height of the caret. | |||
===caretOffset=== | |||
The offset of the caret of the edit. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"caretOffset",offset)</syntaxhighlight> | |||
*'''offset''' : A float of the offset of the caret of the edit. | |||
===caretPos=== | |||
The position where the caret stays. | The position where the caret stays. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"caretPos",index)</syntaxhighlight> | ||
*'''index''' : An integer of the index of the text that the caret stays. | *'''index''' : An integer of the index of the text that the caret stays. | ||
===text=== | ===clearSelection=== | ||
This is equivalent to [[ | This property determines whether the text selection will be cleared when the edit blurs. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"clearSelection",clearSelection)</syntaxhighlight> | ||
*''' | *'''clearSelection''' : A bool indicates whether the text selection will be cleared when the edit blurs. | ||
===caretStyle=== | |||
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_ | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"caretStyle",caretStyle)</syntaxhighlight> | |||
*'''caretStyle''' : An integer of the caret style of the edit. | |||
===caretThick=== | |||
This property allows us to change the thickness of caret of the edit. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"caretThick",caretThick)</syntaxhighlight> | |||
*'''caretThick''' : An integer of the thickness of the caret of the edit. | |||
=== | ===caretWidth=== | ||
This | This property allows us to change the caret width in caretStyle '''"1"'''. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"caretWidth",{caretWidth,caretDefaultWidth,relative})</syntaxhighlight> | ||
*''' | *'''caretWidth''' : A float of the width of the caret of the edit. If '''relative''' is ''true'', this will refer to font width of a character. | ||
*'''caretDefaultWidth''' : A float of the width of the caret of the edit when there is no text to refer. If '''relative''' is '''true''', this will refer to '''textSize'''. | |||
*'''relative''' : A bool indicates whether caret width is relative or absolute. | |||
=== | ===enableTabSwitch=== | ||
This property determines whether we can use the key "tab" to switch to another edit. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"enableTabSwitch",enableTabSwitch)</syntaxhighlight> | ||
*''' | *'''enableTabSwitch''' : A bool indicates whether we can use the key ''tab'' to switch to another edit. | ||
=== | ===font=== | ||
This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]'' | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"font",font)</syntaxhighlight> | ||
*''' | *'''font''' : A [[Element/DX_font|dx font element]] of the text font of the edit. | ||
===masked=== | ===masked=== | ||
Line 54: | Line 142: | ||
*'''maskText''' : A string that the masked text will be. | *'''maskText''' : A string that the masked text will be. | ||
=== | ===maxLength=== | ||
This is equivalent to [[dgsEditGetMaxLength]]/[[dgsEditSetMaxLength]] | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"maxLength",maxLength)</syntaxhighlight> | |||
*'''maxLength''' : An integer indicating the maximum number of characters that can be typed into the edit box. | |||
This is equivalent to [[ | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | |||
*''' | |||
=== | ===padding=== | ||
This | This property determines the padding of the text. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"padding",{paddingX,paddingY})</syntaxhighlight> | |||
*'''paddingX''' : An integer of 2D x padding value. | |||
*'''paddingY''' : An integer of 2D y padding value. | |||
This | ===placeHolder=== | ||
This is equivalent to [[dgsEditSetPlaceHolder]]//[[dgsEditGetPlaceHolder]] | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolder",placeHolder)</syntaxhighlight> | |||
*'''placeHolder''' : A string of the place holder text of dgs edit ( This text will show when there is no text in a blurred dgs edit ). | |||
===placeHolderColor=== | |||
This property determines the color of the place holder text. The color which can be translated by [[tocolor]]. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderColor",placeHolderColor)</syntaxhighlight> | |||
*'''placeHolderColor''' : An integer of the color of the place holder text of the edit. | |||
This | ===placeHolderColorcoded=== | ||
This property determines whether the place holder supports color code. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderColorcoded",placeHolderColorcoded)</syntaxhighlight> | |||
*'''placeHolderColorcoded''' : A bool indicates whether the place holder supports color code. | |||
===placeHolderFont=== | |||
This property changes the font of place holder. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderFont",placeHolderFont)</syntaxhighlight> | |||
*'''placeHolderFont''' : A string/dx-font element of the font of the place holder. | |||
This | ===placeHolderIgnoreRenderTarget=== | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | This property determines whether the place holder isn't restricted by render target. | ||
*''' | <syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderIgnoreRenderTarget",placeHolderIgnoreRenderTarget)</syntaxhighlight> | ||
*'''placeHolderIgnoreRenderTarget''' : A bool indicates whether the place holder isn't restricted by render target. | |||
=== | ===placeHolderOffset=== | ||
This property allows | This property allows place holder has offsets relative to its original position. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderOffset",{ xOffset, yOffset })</syntaxhighlight> | ||
*''' | *'''xOffset''' : An integer of 2D x offset. | ||
*'''yOffset''' : An integer of 2D y offset. | |||
=== | ===placeHolderVisibleWhenFocus=== | ||
This property allows place holder to be visible even when edit is focused. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderVisibleWhenFocus",placeHolderVisibleWhenFocus)</syntaxhighlight> | ||
*''' | *'''placeHolderVisibleWhenFocus''' : A bool indicates whether the place holder when the edit is focused. | ||
=== | ===placeHolderTextSize=== | ||
The scale of the place holder of the edit. ''Learn More [[dxDrawText]]'' | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"textSize",{scaleX,scaleY})</syntaxhighlight> | ||
*''' | *'''scaleX''' : A float of the 2D X scale of the place holder of the edit. | ||
*'''scaleY''' : A float of the 2D Y scale of the place holder of the edit. | |||
===readOnly=== | ===readOnly=== | ||
Line 110: | Line 205: | ||
*'''readOnlyCaretShow''' : A bool indicates whether the caret is shown or hidden when the edit is read-only. | *'''readOnlyCaretShow''' : A bool indicates whether the caret is shown or hidden when the edit is read-only. | ||
=== | ===renderTarget=== | ||
The | This property stores a render target of the edit. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"renderTarget",renderTarget)</syntaxhighlight> | ||
*''' | *'''renderTarget''' : A render target that is used to render the text. | ||
===selectColorBlur=== | |||
The color which can be translated by [[tocolor]] of the rectangle of text selection of the edit when blurred. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit,"selectColorBlur",selectColorBlur)</syntaxhighlight> | |||
*'''selectColorBlur''' : An integer of the color of the rectangle of text selection of the edit when blurred. | |||
=== | ===selectColor=== | ||
The | The color which can be translated by [[tocolor]] of the rectangle of text selection of the edit. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"selectColor",selectColor)</syntaxhighlight> | ||
*''' | *'''selectColor''' : An integer of the color of the rectangle of text selection of the edit. | ||
=== | ===selectFrom=== | ||
The | The position from which the text is selected. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"selectFrom",{index,line})</syntaxhighlight> | ||
*''' | *'''index''' : An integer of the index of the text that selected from. | ||
=== | ===shadow=== | ||
The shadow text of the edit. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"shadow",{offsetX,offsetY,color,outline})</syntaxhighlight> | ||
*''' | *'''offsetX:''' A float of the 2D X offset of the shadow text of the edit. | ||
*'''offsetY:''' A float of the 2D Y offset of the shadow text of the edit. | |||
*'''color:''' An integer of the color of the shadow text of the edit. | |||
*'''outline:''' An integer of the outline style of the shadow text. | |||
=== | ===text=== | ||
This | This is equivalent to [[dgsSetText]]/[[dgsGetText]]. | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"text",text)</syntaxhighlight> | ||
*''' | *'''text''' : A ''table'' of the text of the edit.( Because of multi lines, I use table instead of string ) | ||
=== | ===textColor=== | ||
The color which can be translated by [[tocolor]] of the text of the edit. | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"textColor",textColor)</syntaxhighlight> | ||
*''' | *'''textColor''' : An integer of the color of the text of the edit. | ||
=== | ===textSize=== | ||
The scale of the text of the edit. ''Learn More [[dxDrawText]]'' | |||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"textSize",{scaleX,scaleY})</syntaxhighlight> | ||
*''' | *'''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. | |||
=== | ===typingSound=== | ||
This | Typing sound, nil for disabled. This is equivalent to [[dgsEditSetTypingSound]]/[[dgsEditGetTypingSound]] | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"typingSound",typingSound)</syntaxhighlight> | ||
*''' | *'''typingSound:''' A string of the path/url of typing sound. | ||
=== | ===typingSoundVolume=== | ||
This | Typing sound, nil for disabled. This is equivalent to [[dgsEditSetTypingSoundVolume]]/[[dgsEditGetTypingSoundVolume]] | ||
<syntaxhighlight lang="lua">dgsSetProperty(edit," | <syntaxhighlight lang="lua">dgsSetProperty(edit,"typingSoundVolume",typingSoundVolume)</syntaxhighlight> | ||
*''' | *'''typingSoundVolume:''' A float of the volume of the typing sound. Range is from 0.0 to 1.0. This can go above 1.0 for amplification. | ||
==See Also== | ==See Also== | ||
{{DGSPROPERTIES}} | {{DGSPROPERTIES}} |
Latest revision as of 07:45, 30 June 2023
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
alignment
Alignment of the text within the edit.
The functions as follows are basic on this property.
dgsEditSetHorizontalAlign/dgsEditGetHorizontalAlign
dgsEditSetVerticalAlign/dgsEditGetVerticalAlign
dgsSetProperty(edit,"alignment",{alignX,alignY})
- alignX : Horizontal alignment of the text within the edit. Can be "left", "center" or "right".
- alignY : Vertical alignment of the text within the edit. Can be "top", "center" or "bottom".
allowCopy
This propertry determines whether the text can be copyed ( ctrl+c ) or cut ( ctrl+x )
dgsSetProperty(edit,"allowCopy",allowCopy)
- allowCopy : A bool indicates whether the text can be copyed ( ctrl+c ) or cut ( ctrl+x )
autoComplete
This propertry allows auto complete for edit. See dgsEditAddAutoComplete\dgsEditRemoveAutoComplete\dgsEditSetAutoComplete\dgsEditGetAutoComplete
dgsSetProperty(edit,"autoComplete",autoComplete)
- autoComplete : The auto complete table. Structure is as follows:
autoComplete = { name1 = isSensitive, name2 = isSensitive, }
autoCompleteSkip
This propertry allows skip auto complete detect.
dgsSetProperty(edit,"autoCompleteSkip",autoCompleteSkip)
- autoCompleteSkip : A bool if whether disabling auto complete check
autoCompleteShow
This propertry stores current showing auto complete item.
dgsSetProperty(edit,"autoCompleteShow",autoCompleteShow)
- autoCompleteShow : A table stores the showing data. Structure is as follows:
autoCompleteShow = {matchedAutoCompletion,showingAutoCompletion}
matchedAutoCompletion may be different from showingAutoCompletion because of case sensitivity.
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.
bgColorBlur
This property determines the background color of the edit when it is blurred.
dgsSetProperty(edit,"bgColorBlur",bgColorBlur)
- bgColorBlur: An integer of the color that can be converted by tocolor, leave to nil to use bgImage.
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).
bgImageBlur
This property determines the background image of the edit when it is blurred.
dgsSetProperty(edit,"bgImageBlur",bgImageBlur)
- bgImageBlur: A material element that serves as the background image of the edit(texture/shader/screen source/renderTarget), leave to nil to use bgImage.
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.
caretHeight
This property determines what's the height of the caret.
dgsSetProperty(edit,"caretHeight",caretHeight)
- caretHeight : A float indicates what's the height of the caret.
caretOffset
The offset of the caret of the edit.
dgsSetProperty(edit,"caretOffset",offset)
- offset : A float of the offset of the caret of the edit.
caretPos
The position where the caret stays.
dgsSetProperty(edit,"caretPos",index)
- index : An integer of the index of the text that the caret stays.
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.
caretStyle
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,"caretStyle",caretStyle)
- caretStyle : An integer of the caret style of the edit.
caretThick
This property allows us to change the thickness of caret of the edit.
dgsSetProperty(edit,"caretThick",caretThick)
- caretThick : An integer of the thickness of the caret of the edit.
caretWidth
This property allows us to change the caret width in caretStyle "1".
dgsSetProperty(edit,"caretWidth",{caretWidth,caretDefaultWidth,relative})
- caretWidth : A float of the width of the caret of the edit. If relative is true, this will refer to font width of a character.
- caretDefaultWidth : A float of the width of the caret of the edit when there is no text to refer. If relative is true, this will refer to textSize.
- relative : A bool indicates whether caret width is relative or absolute.
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.
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.
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.
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.
padding
This property determines the padding of the text.
dgsSetProperty(edit,"padding",{paddingX,paddingY})
- paddingX : An integer of 2D x padding value.
- paddingY : An integer of 2D y padding value.
placeHolder
This is equivalent to dgsEditSetPlaceHolder//dgsEditGetPlaceHolder
dgsSetProperty(edit,"placeHolder",placeHolder)
- placeHolder : A string of the place holder text of dgs edit ( This text will show when there is no text in a blurred dgs edit ).
placeHolderColor
This property determines the color of the place holder text. The color which can be translated by tocolor.
dgsSetProperty(edit,"placeHolderColor",placeHolderColor)
- placeHolderColor : An integer of the color of the place holder text of the edit.
placeHolderColorcoded
This property determines whether the place holder supports color code.
dgsSetProperty(edit,"placeHolderColorcoded",placeHolderColorcoded)
- placeHolderColorcoded : A bool indicates whether the place holder supports color code.
placeHolderFont
This property changes the font of place holder.
dgsSetProperty(edit,"placeHolderFont",placeHolderFont)
- placeHolderFont : A string/dx-font element of the font of the place holder.
placeHolderIgnoreRenderTarget
This property determines whether the place holder isn't restricted by render target.
dgsSetProperty(edit,"placeHolderIgnoreRenderTarget",placeHolderIgnoreRenderTarget)
- placeHolderIgnoreRenderTarget : A bool indicates whether the place holder isn't restricted by render target.
placeHolderOffset
This property allows place holder has offsets relative to its original position.
dgsSetProperty(edit,"placeHolderOffset",{ xOffset, yOffset })
- xOffset : An integer of 2D x offset.
- yOffset : An integer of 2D y offset.
placeHolderVisibleWhenFocus
This property allows place holder to be visible even when edit is focused.
dgsSetProperty(edit,"placeHolderVisibleWhenFocus",placeHolderVisibleWhenFocus)
- placeHolderVisibleWhenFocus : A bool indicates whether the place holder when the edit is focused.
placeHolderTextSize
The scale of the place holder of the edit. Learn More dxDrawText
dgsSetProperty(edit,"textSize",{scaleX,scaleY})
- scaleX : A float of the 2D X scale of the place holder of the edit.
- scaleY : A float of the 2D Y scale of the place holder of the edit.
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.
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.
selectColorBlur
The color which can be translated by tocolor of the rectangle of text selection of the edit when blurred.
dgsSetProperty(edit,"selectColorBlur",selectColorBlur)
- selectColorBlur : An integer of the color of the rectangle of text selection of the edit when blurred.
selectColor
The color which can be translated by tocolor of the rectangle of text selection of the edit.
dgsSetProperty(edit,"selectColor",selectColor)
- selectColor : An integer of the color of the rectangle of text selection of the edit.
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.
shadow
The shadow text of the edit.
dgsSetProperty(edit,"shadow",{offsetX,offsetY,color,outline})
- offsetX: A float of the 2D X offset of the shadow text of the edit.
- offsetY: A float of the 2D Y offset of the shadow text of the edit.
- color: An integer of the color of the shadow text of the edit.
- outline: An integer of the outline style of the shadow text.
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 )
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.
typingSound
Typing sound, nil for disabled. This is equivalent to dgsEditSetTypingSound/dgsEditGetTypingSound
dgsSetProperty(edit,"typingSound",typingSound)
- typingSound: A string of the path/url of typing sound.
typingSoundVolume
Typing sound, nil for disabled. This is equivalent to dgsEditSetTypingSoundVolume/dgsEditGetTypingSoundVolume
dgsSetProperty(edit,"typingSoundVolume",typingSoundVolume)
- typingSoundVolume: A float of the volume of the typing sound. Range is from 0.0 to 1.0. This can go above 1.0 for amplification.
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