View Single Post
02-18-11, 01:28 PM   #12
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
so then this should set the first button's text to general right? its telling me on the settext line that button1 does not exist... i also tried being literal and putting button[1] but then it tells me "button" does not exist.

lua Code:
  1. for bnid = 1, #HelpHeaders do
  2.     LeftScrollBar.scrollChild.button[bnid] = CreateFrame('button', "HHeaderButton" .. bnid, LeftScrollBar.scrollChild)
  3.    
  4.        
  5.     LeftScrollBar.scrollChild.button[bnid].text = LeftScrollBar.scrollChild.button[bnid]:CreateFontString("HHeaderButtonText" .. bnid, 'DIALOG')
  6.     LeftScrollBar.scrollChild.button[bnid].text:SetFont([[Fonts\FRIZQT__.TTF]], 14)
  7.     LeftScrollBar.scrollChild.button[bnid].text:SetPoint("CENTER", LeftScrollBar.scrollChild.button[bnid], "CENTER", 0, 0)
  8.     LeftScrollBar.scrollChild.button[bnid].text:SetTextColor(.50, .90, .80, 1)
  9.    
  10. end
  11.  
  12. LeftScrollBar.scrollChild.button1.text:SetText("General")

i think the method of using LeftScrollBar.scrollChild.button[bnid] is not right for some reason.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 02-18-11 at 01:38 PM.
  Reply With Quote