Grouping Multiple Objects

I have a question about grouping. I have created multiple items and I want to combine them. My issue is that I have created each item to use a mouse over and increase in size. I want to place the second object overtop of the first object and make it semi-transparent. So that the first object appears to be inside of the second When I mouse over the grouped items I want both to enlarge or come forward as one group.

Is this possible? Thanks for the help.
7,315 views 12 replies
Reply #1 Top
Yes.

I'm assume object two is larger than object one otherwise you would have set it as a child object of object one?

Use a For Next Statement in your OnStateChange Function

Code: vbscript
  1. For each elem in desktopx.GroupObjects("objGroup")
  2. elem.resize 100,100 ' I believe it's width then height
  3. Next
Reply #2 Top
SirSmiley,

Thank you for the reply, I am as green as they come about DesktopX and scripting. You could hold my knowledge of scripting in a tea cup. I get the concept and understand the script after it's written but to write it myself is a bit of work.

So then it is only possible to group two separate object both with mouse over states using vbscript?

Is there a tutorial here that I can read and walk though? I have looked at the tutorials that are listed so far and they have been very helpful. I didn't see one that discussed grouping multiple objects with mouse over states.
Reply #3 Top
Let me see if I understand you correctly. You have two objects that are grouped, and both have mouse over states. You want object2 (the larger one?) on top of object1. You want both of the objects to resize when you mouse over object2? SirSmiley's script should do the trick, I think.

Or are you trying to activate the mouse over state of both objects when you mouse over object2? And your mouse over states have the larger images?




I don't know of any tuts that address you query specifically but here are some links for DX help:

DX Developer's Guide
Wincustomize Wiki
RomanDA Step by Step Tutorial Listing
sViz DX Tutorial Index



Reply #4 Top
No problem. You could hold my level of scripting knowledge in a teapot so, there's not a big leap to add a few more cups!

Don't mean to confuse anyone but, the best way is to use the features all ready built in.

For someone reason I always jump to script.

For the top (second) object, Try this:
1. In the properties window select the "states" tab
2. Select the "mouse over" state.
3. Choose the messages tab below
4. Select Add. This will open the "Add New Message" Window
5. Select "Object ID" then use the drop down box to select object one
6. Under "Message" choose the "Mouse over" state from the drop down box
7. Select Okay (Closes Add New Message window)
8. Hit ok or select apply under the properties window.

When you mouse over the second object this will control the first object's mouse over state.

I'll admit that I started a little ahead of most people because of my understanding of MS Access and very basic MSVBA but, most of my scripts are fairly simple they just appear complex to the unfamiliar.

Their is an abundant supply of information in this thread and these other two threads.
To start maybe check on Frogboy's and Cerebro's posts from a few years ago. That's where I started. Oh, and don't forget the Wiki, sViz has put up an extreme amount of info there.

DesktopX Forum
DesktopX Tutorials

Edit: See sViz beat me to the punch! :lol:
Reply #5 Top
For someone reason I always jump to script.
End of quote


Heh, me too! Always forget those state messages.
Reply #6 Top
It works to a certain point, they both mouse over but the bottom object doesn't go back to mouse away position. They aren't functioning as one object, they both mouse over fine but there seems to be a delay in the response time coming forward and moving back again.
Reply #7 Top
Im getting closer I followed Wiki's instructions and set the parent child and I also used SirSmiley's instructions on both the Mouse over and Mouse away. So now they are moving sync, however, the second object size on the mouse is off set from the first (child) object. I think what I need to do is edit my parent object so that it is in ratio to the child object and they mouse over in proportion.

Does that make sense?
Reply #8 Top
UPDATE #2

I also changed the allignment to be center and that is almost perfect! I will need to take my png's back into Photoshop to clean it up. Thank you for the help. I'll eventually post the final stuff when I get it done.

Cheers
Reply #9 Top
Good to hear you're making progress.    If we could see some pics it might be easier to understand exactly what you're trying to do. Anyways, good luck.   
Reply #10 Top
Sounds like you're doing well.

Honestly, I wouldn't even worry about learning scripting until after you've learned all of the GUI features.

Most people can do more than they even imagined without any scripting. IMO that's part of what put's DesktopX ahead of any other widget app out there.

Reply #11 Top
Update: I have since made the process much easier by taking my icons into photoshop and combining them there. Now instead of 4 separate icons I have two and it works and looks much better. Thanks again for the help and direction.
Reply #12 Top
overlapping items are always a pain to work with. You can never be 100% sure you are "over" the right one. And there are settings for "RECTANGLE" "VISIBLE" for the mouse over area as well that can cause problems.

I might be on the look for some ideas for some new tutorials (maybe) so.. i might start a thread for ideas. Email me if you have something good.