Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Objects not updating ControlSource
Message
De
19/09/2001 10:09:54
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00558218
Message ID:
00558308
Vues:
21
Thanks for the replies

Will the Valid Method work ?

I will only be requiring this feature on Textboxes/Comboboxes. What I'm thinking of in the Save button is:
IF loForm.ActiveControl.Valid()
     loForm.OnSave()
ENDIF
This way the value will be saved and I won't get stuck in a validation loop if the control doesn't pass it's validation (which I've encountered).

Kev

>The replies given by others are all good. We use a top-level form so _SCREEN is not around. On this top form is a hidden "dummy" textbox control that we can use to set focus to. Our toolbar's saving checks for this textbox and if present (which it should be), sets focus to it and we don't have to write code to determine the current active control.
>
>Steve
>
>
>>Hi
>>
>>My app mainly consists of a Toolbar which talks to the current active form on the app.
>>
>>If I am in a Textbox and I enter a value, and then click on the Save button in my toolbar - the ControlSource is not updating. I would have thought that as soon as I clicked on the Save button, the Textbox would lose focus and write it's value back to the controlsource.
>>
>>The only explaination I can think for this is that the Textbox may be losing it's focus, but only because the toolbar has got the focus, but the form still has the textbox as the current focus - am I right in saying that?
>>
>>Can someone explain this, and if it is what I've said above, what would be the best solution to ensure that Values are written back to the Data?
>>
>>Thanks
>>Kev
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform