Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(add examples)
mNo edit summary
Line 1: Line 1:
 
{{widgetmethod}}
 
{{widgetmethod}}
 
Selects text in an EditBox.
 
EditBox:HighlightText([start, [end]])
   
 
== Arguments ==
Highlights the text in an EditBox.
 
 
;start : Number - the position at which to start the highlight; defaults to 0 if not specified.
 
 
;end : Number - the position at which to stop the highlight; defaults to the end of the string if not specified. Indices use standard Lua semantics, so -1 is the end of the string.
EditBox:HighlightText([start], [end])
 
 
== Parameters ==
 
=== Arguments ===
 
 
:;Start : [Optional] Integer - the position at which to start the highlight and defaults to 0 if omitted.
 
:;End : [Optional] Integer - the position at which to stop the highlight and defaults to the end of the string if omitted. Indices use standard Lua semantics, so -1 is the end of the string.
 
   
 
== Details ==
 
== Details ==
 
* The position before the first character is 0.
 
 
* Leaving out both parameters, as in '''EditBox:HighlightText()''', will highlight the entire EditBox content.
The position before the first character is 0.
 
 
Leaving out both parameters, as in '''EditBox:HighlightText()''', will highlight the entire EditBox content.
 
   
 
== Examples ==
 
== Examples ==

Revision as of 22:22, 3 March 2013

Selects text in an EditBox.

EditBox:HighlightText([start, [end]])

Arguments

start
Number - the position at which to start the highlight; defaults to 0 if not specified.
end
Number - the position at which to stop the highlight; defaults to the end of the string if not specified. Indices use standard Lua semantics, so -1 is the end of the string.

Details

  • The position before the first character is 0.
  • Leaving out both parameters, as in EditBox:HighlightText(), will highlight the entire EditBox content.

Examples

editbox:HighlightText()       -- highlights entire content
editbox:HighlightText(0,-1)   -- also entire content
editbox:HighlightText(0,0)    -- removes highlighting