WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Multi-line editbox (https://www.wowinterface.com/forums/showthread.php?t=49785)

MaLarsson 08-23-14 07:09 PM

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.

Lombra 08-23-14 07:35 PM

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")


MaLarsson 08-23-14 09:19 PM

It worked perfectly, thanks! :)


All times are GMT -6. The time now is 12:54 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI