Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A Couple of Questions
Message
De
16/10/2007 11:17:10
 
 
À
16/10/2007 09:57:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01261225
Message ID:
01261258
Vues:
10
>Hi All,
>
>Question #1:
>
>I'm writing an application that has some custom classes that can be dynamically added to a form via a button. I assume I'll use the addobject method of the form to add custom class to the form but I'd like button's click code to act the same as when I add the class from the controls menu... ie when the class is dragged to the form from the it's menu it dynamically creates the class and assigns the class name automatically.
>

You'll have to choose the object name since you'll be using thisform.AddObject()


>
>Question #2:
>
>The custom class has a container with several objects ( shape, label etc. ) contained within. I've set the oledragmode to 1 for the container so I can drag/drop it around the form. What I've noticed is that unless I click and drag the container the drag/drop doesn't work. How do I set it so if I click and drag anywhere on the object it works ?
>

Since when you click on an object that's in the container and try to start the drag, the short answer is you can't, you're not on the container, you're on the object in the container. You'll have to put some sort of transparent shape over the object to trap the click, and pass the information down to the container itself. I've never tried doing that through the shape on top for drag/drop, but I guess it could be done. Maybe you can do it in each of the objects in the container to pass the click down to the container.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform