Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ObjToClient?
Message
De
26/01/2001 16:41:46
 
 
À
26/01/2001 16:28:57
Jill Derickson
Software Specialties
Saipan, CNMI
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00467649
Message ID:
00469246
Vues:
11
>Good morning Fred,
>
>: Not to drag this out or anything, but what do you mean you only see the Top value?
>
>I mean that the value returned when I call objToClient often seems to often be the TOP property value, not the offset from the top of the form - or even some other value.
>
>: Or are you only moving just the Top?
>I'm not doing much moving in the testing, just seeing that the value of the ObjToClient of the text box is sometimes the offset from the top of the container, or some other value, not the offset from the top of the form (or am I expecting the wrong values? maybe this is the problem - that I am misunderstanding ObjToClient?)
>
>OK...starting from scratch:
>
>Create a form from the base VFP form; create a container on the form, FormContainer, w/TOP of 20; w/in the FormContainer, create a textbox, w/TOP of 10. This works fine:
>
>FormContainer ObjToClient = 20
>FormContainer TextBox ObjToClient = 30
>
>This is as expected, right?.
>
>Now, save that container AS a class, ContainerFromClass. Put a ContainerFromClass on the form, w/Top of 20. Now the values I get are:
>
>FormContainer ObjToClient = 20
>FormContainer TextBox ObjToClient = 30
>
>Class FormContainer ObjToClient = 20
>Class FormContainer TextBox ObjToClient = 20
>
>
>: What exactly do you have in your form Init?
>
WAIT WINDOW "Form Container ObjToClient = " + STR(ObjToClient(ThisForm.FormContainer,1))+chr(13)+;
> "Form Container Textbox ObjToClient = " + STR(ObjToClient(ThisForm.FormContainer.Text1,1))+chr(13)+;
> "Class Form Container ObjToClient = " + STR(ObjToClient(ThisForm.ContainerFromClass,1))+chr(13)+;
> "Class Form Container Textbox ObjToClient = " + STR(ObjToClient(ThisForm.ContainerFromClass.Text1,1))
>
>Thanks for hanging in w/me. J

OK, now I see what you mean. If you don't modify the textbox position in the subclass instance, OBJTOCLIENT doesn't seem to report the correct value. If you change it, it works. Very strange.
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