View Single Post
05-03-21, 11:20 AM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
Code:
button.Text:SetText(item.text or "");

local tex = button:CreateTexture(nil, "BACKGROUND")
tex:SetAllPoints()
tex:SetTexture("Interface\\Tooltips\\UI-Tooltip-Background")
tex:SetGradientAlpha("HORIZONTAL", unpack({0.15,0.6,0.15,1, 0.15,0.6,0.15,0}))
button.Texture = tex
button.Texture:Hide()
This indicates that you are creating a new background texture every time you scroll and update a row of the scrollframe. Each row will end up with multiple textures on top of each other with the previous ones permanent display state being what it was before you create and assign the new one with button.Texture = tex

You could apply the texture to the Background element of the HybridScrollDemoListItemTemplate section of the XML (this defines what each row will look like). You can then just set the colour etc. (highligh or default) of the background texture when you set the text.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 05-03-21 at 11:40 AM.
  Reply With Quote