View Single Post
03-10-21, 07:39 PM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Alternatively for button names you could use

"$parentbtn" .. index

$parent will be replaced with the name of the buttons parent frame. It's the same as:
Lua Code:
  1. DeathKnightChatScrollFrame.buttons[index] = CreateFrame("Button", DeathKnightChatScrollParent:GetName() .. "btn" .. index, DeathKnightChatScrollParent, "OptionsListButtonTemplate")

It assumes the parent frame has a name which seems likely given you're naming the buttons.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 03-10-21 at 07:43 PM.
  Reply With Quote