Can't "save" an image for a state
So object shows empty
from
WinCustomize Forums
I have an object that I want to use different images based on some condition. The problem is that DesktopX doesn't save images with the object if they don't belong to one of the states and I can't use the default states because they don't fit what I need. What ends up happening is that when the object needs to switch an image it becomes empty because it can't find an image and I have to manually show it where it is.
I tried creating custom states in the OnScriptEnter function by doing something like this:
Object.State = "stateA"
Object.States("StateA").Picture = imageA
Object.State = "stateB"
Object.States("StateB").Picture = imageB
And then when I need to change the image I do something like:
If something Then
Object.State = "stateA"
Object.Picture = imageA
Else
Object.State = "stateB"
Object.Picture = imageB
End If
Now, that just doesn't look right to me, but I've no idea what to do here
Anyway, it didn't work so I'd appreciate any help.
I tried creating custom states in the OnScriptEnter function by doing something like this:
Object.State = "stateA"
Object.States("StateA").Picture = imageA
Object.State = "stateB"
Object.States("StateB").Picture = imageB
And then when I need to change the image I do something like:
If something Then
Object.State = "stateA"
Object.Picture = imageA
Else
Object.State = "stateB"
Object.Picture = imageB
End If
Now, that just doesn't look right to me, but I've no idea what to do here
Anyway, it didn't work so I'd appreciate any help.