Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy,paste placement
Message
De
29/05/2003 09:16:45
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00793536
Message ID:
00793887
Vues:
33
Hi David

A builder was suggested earlier, but I thought of a little twist ;) Set up an ON KEY LABEL CTRL+K DO MyPasteMover WITH -8, 16.

Then all I need to do is Copy a control, Paste, Ctrl+K and the new control is positioned properly and selected so I can continue making other changes.

I even thought to make an INI file or some place to hold the values so I can edit them periodically.

>Mike,
>
>Write your own little builder to do it. After the paste the objects will all be available to aselobj() and you can iterate them changing the .Left and .Top by parameters you send to the builder. If you've never written one there's a coupld of quick samples over on my website.
>
>
function MyPasteMover( lnHorizontal, lnVertical )
>n = aselobj( laObjects )
>for i = 1 to n
>   with laObjects[i]
>      .Left = .Left + lnHorizontal
>      .Top = .Top + lnVertical
>   endwith
>endfor
>return
>
>So after the paste, in the command window: MyPasteMover( 10, 20 )
>
>>When I copy a control from a form and paste it onto the same form, the new control is placed a little down and to the right of the current control. Is there any way to alter how far down and how far over?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform