ID:1205031
 
(See the best response by Kaiochao.)
'Ello BYOND's Elite, it's been a long time since I've needed to post here but this just isn't making sense to me.

I'm trying to change the image of a button in my screen, I use Interface commands all the time but I have never tried to change something's icon before.

So what I've been trying to do is,

winset(src, "WindowChat.ChatLock", "image='Lock.dmi'")
(WindowChat being the window, and ChatLock being the button)

(I've tried variations of this, of course. Lock.dmi without the '' around it and whatnot.)

Which clearly doesn't work.
Now I have done a winget on the buttons current image, which returns as Locked.dmi (the icon I want to change it FROM)

To anyone wondering what it is I'm doing, I'm putting a small padlock button at the top that a player can push to make the window re-sizable or not
That works fine but this dang button won't change.
Okie dokie I figured it out.
To anyone curious, I had to set a variable as the icon before hand

So instead of just

winset(src, "WindowChat.ChatLock", "image='Lock.dmi'"

I had to do
var/I = 'Lock.dmi'
winset(src, "WindowChat.ChatLock", "image=[I]")
Best response
//  In here, 'Lock.dmi' is considered just text.
winset(src, "WindowChat.ChatLock", "image='Lock.dmi'")

// Here, a special reference to the icon file is inserted,
// rather than "Lock.dmi", which is just text.
winset(src, "WindowChat.ChatLock", "image=['Lock.dmi']")
Yeah I totally get what my problem was now, thank you though Kaiochao

Was about three seconds after my last post that I realized what I'd said.
I really shouldn't program while I'm sick lol