Object Controllers

I have created object controllers for other objects that work just fine until I exit the desktop theme and re-enter. How do stop the object that the object controllers are controlling from re-appearing every time I restart my computer or reload the desktop theme? Is there a script I can enter to keep this from happening?
2,990 views 4 replies
Reply #1 Top
Steve - I don't know of a way to have the object default to being toggled off (I just tried it), but you could fairly easily make a script that toggles the visibility attribute of the object you want to toggle. Then just set that object to not visble by default, and when you reload DX (or reboot) it will be gone until your script in the controller object sets it to visible. I use this a lot for dialogs and panels.

If this is not clear let me know and I will elaborate on "how to..."
Reply #3 Top
First of all, to get in depth with DX scripting, check out the documentation: Link

Now, for the specific thing you need to do, you need one object which will appear and disappear, and one which will control that action.

You need to give the object that will be controled an Object ID. For this example we'll use "PopupOb".

For the controling object you need to create a script. In the script you need to include a callback function:

Sub Object_OnLButtonUp(x,y,dragged)
If not dragged then
If DesktopX.Object("PopupOb").Visible = TRUE Then
DesktopX.Object("PopupOb").Visible = FALSE
Else
DesktopX.Object("PopupOb").Visible = TRUE
End If
End If
End Sub

This will give you the basic functionality you want. To really do the script correctly you should also probably check to make sure the object exists before trying to access it (If DesktopX.IsObject("PopupOb") Then ...)
Reply #4 Top
To make an object invisible at startup just right click it and open it's properties from in builder mode. Then change the visible at startup property on the relation tab. (Think it's relation tab, second one along).

Posted via WinCustomize Browser/Stardock Central