Thread: Text label
View Single Post
02-14-17, 12:58 PM   #1
Marsgames
An Aku'mai Servant
 
Marsgames's Avatar
Join Date: Jul 2016
Posts: 33
Text label

Hey,

This is a really basic question but I don't find how to add some text to a frame.
I have a frame with 3 editBox
Lua Code:
  1. local function createEditBox( nomEditBox, frameParent, posX, posY, text, longueur)
  2.     local nomEditBox = CreateFrame("EditBox", tostring( nomEditBox ), frameParent, "InputBoxTemplate")
  3.     nomEditBox:SetPoint("CENTER", posX + decallageX, posY + decallageY)
  4.     nomEditBox:SetText(text)
  5.     nomEditBox:SetFrameStrata("HIGH")
  6.     nomEditBox:SetSize(longueur, 1)
  7.     nomEditBox:SetScript("OnEscapePressed", function(self)
  8.         local frame = frameParent:GetParent()
  9.         local parent = frame:GetParent()
  10.         parent:Hide()
  11.     end)
  12.  
  13.     return nomEditBox
  14. end
  15.  
  16. editBox1 = createEditBox(self, customWeightPanel, 50, 90, "Box1", 250)
  17. editBox2 = createEditBox(self, customWeightPanel, 50, 60, "Box2", 250)
  18. editBox3 = createEditBox(self, customWeightPanel, 50, 30, "Box3", 250)

And I would have a text at the right of the edit box to describe what I want to put inside

Thanks
  Reply With Quote