WoW:UIHANDLER OnTabPressed: Difference between revisions

m
Move page script moved page UIHANDLER OnTabPressed to WoW:UIHANDLER OnTabPressed without leaving a redirect
mNo edit summary
m (Move page script moved page UIHANDLER OnTabPressed to WoW:UIHANDLER OnTabPressed without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{wowapi}}
{{widgethandler}}
Fires when tab is pressed
EditBox:OnTabPressed(self)


EditBox:OnTabPressed()
== Example ==
 
  EditBox:SetScript("OnTabPressed", function(self)
You can only append or prepend a tab no matter what. I don't think there's a way to insert a tab at the cursor position,
    self:Insert("   "); -- ''(4 spaces)''
unless there's a function that will get the position of the cursor. [[User:Egingell|Egingell]] 09:27, 13 April 2007 (EDT)
 
Possible for inserting a tab character("\t")?
  EditBox:SetScript("OnTabPressed", function()
  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]]
 
{{DEFAULTSORT:OnTabPressed}}
Anonymous user