WoW:UIHANDLER OnTabPressed: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page UIHANDLER OnTabPressed to UIHANDLER OnTabPressed without leaving a redirect)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  EditBox:OnTabPressed()
{{widgethandler}}
Fires when tab is pressed
  EditBox:OnTabPressed(self)


Possible for inserting a tab character("\t")?
== Example ==
 
  EditBox:SetScript("OnTabPressed", function(self)
  EditBox:SetScript("OnTabPressed", function()
    self:Insert("   "); -- ''(4 spaces)''
  this:SetText(this:GetText().."\t");
  end;
  end;
 
This will insert 4 spaces at your cursor's position. A tab character or \t will not work, therefore spaces are used.
-- As documented by [[user:egingell|egingell]]

Latest revision as of 04:49, 15 August 2023

Widget handlers < OnTabPressed

Fires when tab is pressed

EditBox:OnTabPressed(self)

Example[edit]

EditBox:SetScript("OnTabPressed", function(self)
    self:Insert("    "); -- (4 spaces)
end;

This will insert 4 spaces at your cursor's position. A tab character or \t will not work, therefore spaces are used.