Thread Tools Display Modes
05-04-11, 11:07 PM   #1
Greywolf65
A Murloc Raider
Join Date: Jul 2009
Posts: 7
I can only get 1 editbox to show up properly.

Hey all. I have a loop that generates a whole bunch of edit boxes using LUA. I'm not using XML at all in this addon. It seems that no matter what I do, the 2nd through Nth edit box does not display properly--specifically, the middle portion of it fades into the background. I can still type values in them, but as you can see from the screenshot, it's total garbage.



So, I tried all sorts of different things. Even if I space them out severely so there's no chance of any overlap, only the 1st one (top left in photo) shows up properly. I tried making only two editboxes, far away from each other, and the 2nd one had its middle faded into the background as shown above. This is my editbox_maker code:

Code:
local function Editbox_Maker(offset, width, height, saved_var, key, num)

	F = CreateFrame("EditBox", "edit box", f1, "InputBoxTemplate");
             --where f1 is the large grey frame.
	F:SetMaxLetters(20)
	F:SetWidth(width);
	F:SetAutoFocus(false);
	F:SetPoint("LEFT", f1, 100+offset, height);
	F:SetScript("OnTextChanged", UpdateValues);
	F:SetText(saved_var);
	F:Show();

	return F;
end
Anyhow, I've wasted hours on this. It's really driven my progress to a halt. Any ideas?
  Reply With Quote
05-05-11, 01:16 AM   #2
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Have you tried to give different names to the editboxes or make F local instead of global ?
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
05-05-11, 04:42 AM   #3
Greywolf65
A Murloc Raider
Join Date: Jul 2009
Posts: 7
Hey, thanks for the tip. I solved the problem: don't use InputBoxTemplate it's messed up... ty for looking at it for me
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » I can only get 1 editbox to show up properly.


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