Grouping
Saturday, December 30, 2006 by Dreamdesign3d | Discussion: Widget talk
Reply #2 Saturday, December 30, 2006 7:53 PM
Reply #3 Sunday, December 31, 2006 8:06 AM
Reply #4 Monday, January 1, 2007 10:53 AM
Reply #5 Thursday, January 4, 2007 6:57 AM
This script would go in the controller
Sub Object_OnLbuttonUp(x,y,dragged)
If Not dragged Then
'Identify if objects are already hidden or showing
Select Case Desktopx.Object("1").visible
Case True
showhide= False
Case False
showhide= True
End Select
'Set objects visibility
Desktopx.Object("1").visible = showhide
Desktopx.Object("2").visible = showhide
Desktopx.Object("3").visible = showhide
End If
End Sub
Or if you name all of the objects you want to control sequentially like this: object1, object2, object3 etc. OR item1, item2, item3 etc.
Then you could use this script:
Dim numofobjs
'Define number of objects to control
numofobjs = 3
Sub Object_OnLbuttonUp(x,y,dragged)
If Not dragged Then toggle
End Sub
Function toggle
'Check the visiblity of object
Select Case Desktopx.Object("object1").visible
Case True
showhide= False
Case False
showhide= True
End Select
'Reset visibility of objects
For x= 1 To numofobjs
desktopx.Object("object" & x).visible =showhide
Next
End Function
Reply #6 Friday, January 5, 2007 12:34 AM
Thank you for taking the time to help me with this.
Reply #7 Friday, January 5, 2007 6:36 AM
On the 2nd script I would recommend that you change the names to p_1, p_2, p_3 (instead of p_01 etc.) it won't work otherwise. With that in mind this is how it should look:
Dim numofobjs
'Define number of objects to control
numofobjs = 3 '---Change this number to amount of objects
Sub Object_OnLbuttonUp(x,y,dragged)
If Not dragged Then toggle
End Sub
Function toggle
'Check the visiblity of object
Select Case Desktopx.Object("p_1").visible
Case True
showhide= False
Case False
showhide= True
End Select
'Reset visibility of objects
For x= 1 To numofobjs
desktopx.Object("p_" & x).visible =showhide
Next
End Function
If you are exporting all the objects together as a widget then there's no need to change desktopx.object to widget However if you are exporting them as four seperate widgets then I'm afraid I know of no way for different widgets to communicate with each other through scripts.
Reply #8 Friday, January 5, 2007 10:38 AM
Reply #9 Friday, January 5, 2007 10:43 AM
Have you thought about adding them to the DX wiki here: http://scratchpad.wikia.com/wiki/DesktopX ?
Reply #10 Friday, January 5, 2007 10:45 AM
Wasn't so long ago when I couldn't understand anything in DX, myself. Be sure to check out w3schools.com for more VBScript information. You can start here at: VBScript Variables and keep going.
EDIT: I'll check it out Zubaz.
EDIT#2: I forgot to mention I just started a blog where I'll be posting some tutorials--sViz at JoeUser
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Saturday, December 30, 2006 5:16 PM
What are you trying to control? Maybe there's a better way of doing it. Scripting maybe?