Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Marking multiple objects on the screen to move them.
Message
 
À
16/02/2010 22:56:15
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01449367
Message ID:
01449801
Vues:
58
>>>This is not for a builder. This is while the VFP 9 program is running.
>>>I have a form where the user is able to move objects around to design a web page. Currently they can only move one object at a time and I need to allow them to mark multiple objects. I think I can select and move them but I'm not too sure on how to mark them in a way it is obvious to the user they are selected. This could be changing color or some kind of border. Any ideas?
>>
>>Yes, using a shape behind the object with distinctive border will make users easy to see what is selected.
>
>Except it would be a bit tedious to place them correctly in the z-order. The selected object may be somewhere in the middle, contained in another object. When we add an object, it has the topmost z-order. We can't push it layer by layer, unfortunately, until it's behind the selected object - .zOrder() has only two possible parameters, 0 and 1. We can push the selected object on top, though, so it would come over the shape. Assuming that we can't select hidden objects anyway, this would work.
>
>The shape would have to be 2 or 4 pixels larger than the selected object, and also its .left and .top 1 or 2 pixels less than those of the selected object.
>
>The shapes and selected objects could all be referenced in an array or a collection, so when one is dragged, the position changes the same for all of them, in a loop.
>
>The downside of this is that in the end the z-order of objects would be out of whack; if that doesn't matter, this could work.

Naomi and Dragan,
I went with covering each selected object with a shape of the same size. The shape is set to fill style 5 - Down Diagonal so it's very visible. I'm adding an object reference and some move code to the shape so when the user moves the shape the object or all selected objects move with it. Looks like it will work great. Thanks.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform