Make sure DesktopX is in authoring mode.
Right click the DesktopX systray icon. If you see "Switch to Authoring
mode", then select it.
Right click again the DesktopX systray icon
and select "New Object".
A new object is created and the Properties
panel for it is opened.
Click New in the Script section of the
General tab.
The DesktopX Script Editor opens.
Now copy and paste the following code into the editor:
Sub
Object_OnDropFiles(files)
Object.picture = files
End Sub
Close the editor. Click Ok in the Properties panel.
Now try to drag and drop some image files
over the object. The picture will change accordingly.
If you open the object properties again and
look into States -> Appearance, Image path, you'll see that the current path
changed to the last dragged image.
A couple things about the .Picture
property: it works in 3 possible ways:
Object.Picture
It will read/write the
picture for the current state. It is suggested you use this only if
your object has one state, use one of the other two methods if you
have more states since that better guarantees the expected result.
Object.States("statename").Picture
It let you specify the
actual state you want to modify.