Thread Tools Display Modes
07-26-05, 11:55 AM   #1
cs01pj
A Defias Bandit
Join Date: Jul 2005
Posts: 3
Can't get SetTexture to work, please help!!

Hi,
This problem has become very frustrating. I have a scroll frame that i can view a list of pictures with associated text. The text appears, but the only way to get the pic to appear is by hard coding it into the xml. I am attemting to use:

Texture:SetTexture("texturePath") - Sets the texture to be displayed

The texture path would be set to something like "Interface\Icons\INV_Axe_20".

So I reference my button with a getglobal call:

getglobal("EV_ListItem"..line.."SlotTexture"):SetTexture("Interface\Icons\INV_Axe_20");

The problem is that the texture does not appear, I just get a highlighted green box. It seems it cannot locate the image.

Any help with this would be greatly appreciated!!

  Reply With Quote
07-26-05, 12:06 PM   #2
cs01pj
A Defias Bandit
Join Date: Jul 2005
Posts: 3
lol, figured it out

I just found the problem, i needed to use double back slashes.

i.e
getglobal("EV_ListItem"..line.."ItemTexture"):SetTexture("Interface\\Icons\\INV_Axe_20");

Instead of

getglobal("EV_ListItem"..line.."ItemTexture"):SetTexture("Interface\Icons\INV_Axe_20");

Hope this helps someone else having a similiar problem
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Can't get SetTexture to work, please help!!


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