WoW:UIHANDLER OnTabPressed: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{wowapi|nosort=1}}
{{widgethandler}}
 
Fires when tab is pressed
  EditBox:OnTabPressed()
  EditBox:OnTabPressed(self)


== Example ==
  EditBox:SetScript("OnTabPressed", function(self)
  EditBox:SetScript("OnTabPressed", function(self)
     self:Insert("    "); -- ''(4 spaces)''
     self:Insert("    "); -- ''(4 spaces)''
  end;
  end;
This will insert 4 spaces at your cursor's position. A tab character or \t will not work, therefore spaces are used.
This will insert 4 spaces at your cursor's position. A tab character or \t will not work, therefore spaces are used.
{{DEFAULTSORT:OnTabPressed}}

Revision as of 04:44, 15 February 2015

Widget handlers < OnTabPressed

Fires when tab is pressed

EditBox:OnTabPressed(self)

Example

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.