Debuffs['1'] = CreateFrame('Button', nil, Debuffs) Debuffs['1']:SetWidth(0) -- buffs fill in from the right Debuffs['1']:SetHeight(self.Buffheight) Debuffs['1']:ClearAllPoints() Debuffs['1']:SetPoint('LEFT', Debuffs, 'LEFT') Buffs['1'] = CreateFrame('Button', nil, Buffs) Buffs['1']:SetWidth(0) -- buffs fill in from the right Buffs['1']:SetHeight(self.Buffheight) Buffs['1']:ClearAllPoints() Buffs['1']:SetPoint('LEFT', Buffs, 'LEFT') for i=2,16 do Debuffs[i] = CreateFrame('Button', nil, Debuffs) Debuffs[i]:SetWidth(0) -- buffs fill in from the right Debuffs[i]:SetHeight(self.Buffheight) Debuffs[i]:ClearAllPoints() Debuffs[i]:SetPoint('LEFT', Debuffs[i-1], 'RIGHT') Buffs[i] = CreateFrame('Button', nil, Buffs) Buffs[i]:SetWidth(0) -- buffs fill in from the right Buffs[i]:SetHeight(self.Buffheight) Buffs[i]:ClearAllPoints() Buffs[i]:SetPoint('LEFT', Buffs[i-1], 'RIGHT') end Debuffs:ClearAllPoints() Debuffs:SetPoint('LEFT', Background, 'RIGHT', self.Backgroundpadding, 0) Buffs:SetPoint('LEFT', Debuffs, 'RIGHT', self.Backgroundpadding, 0)