Quantcast
Multi-line editbox - WoWInterface
Thread Tools Display Modes
08-23-14, 07:09 PM   #1
MaLarsson
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 13
Multi-line editbox

What I want is a 300x300 px big editbox in which multiple lines can be writen, this is the code I have:
Lua Code:
  1. local editBoxSpells = CreateFrame("EditBox", "DoTrackerEditBoxSpells", menu, "InputBoxTemplate")
  2. editBoxSpells:SetMultiLine(true)
  3. editBoxSpells:SetSize(300, 300)
  4. editBoxSpells:SetPoint("TOPLEFT", 300, -107)
  5. editBoxSpells:SetAutoFocus(false)
  6. editBoxSpells:SetText("test")
  7. editBoxSpells:SetCursorPosition(0)
  8. editBoxSpells:SetFont("Fonts\\FRIZQT__.TTF", 10)
  9. editBoxSpells:SetJustifyH("LEFT")
  10. editBoxSpells:SetJustifyV("CENTER")
The problem I have is this:


The background and border of the editbox does not fill up the entire 300x300 px big editbox.
  Reply With Quote
08-23-14, 07:35 PM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
The regions of the InputBoxTemplate template are "fixed" to a certain height. You could try using a backdrop instead.
Code:
local editBoxSpells = CreateFrame("EditBox", "DoTrackerEditBoxSpells", menu)
editBoxSpells:SetBackdrop({
	bgFile = [[Interface\Buttons\WHITE8x8]],
	edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
	edgeSize = 14,
	insets = {left = 3, right = 3, top = 3, bottom = 3},
})
editBoxSpells:SetBackdropColor(0, 0, 0)
editBoxSpells:SetBackdropBorderColor(0.3, 0.3, 0.3)
editBoxSpells:SetMultiLine(true)
editBoxSpells:SetSize(300, 300)
editBoxSpells:SetPoint("TOPLEFT", 300, -107)
editBoxSpells:SetAutoFocus(false)
editBoxSpells:SetText("test")
editBoxSpells:SetCursorPosition(0)
editBoxSpells:SetFont("Fonts\\FRIZQT__.TTF", 10)
editBoxSpells:SetJustifyH("LEFT")
editBoxSpells:SetJustifyV("CENTER")
__________________
Grab your sword and fight the Horde!
  Reply With Quote
08-23-14, 09:19 PM   #3
MaLarsson
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 13
It worked perfectly, thanks!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Multi-line editbox

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off