Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects not updating ControlSource
Message
From
20/09/2001 10:43:44
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00558218
Message ID:
00558732
Views:
18
Steve

I have tested it and it works fine - I think if a control passes it's validation then the value is written back.

Anyway, I will keep in mind your thoughts in case I do run into problems.

Thanks
Kev
>I believe you must set focus to some other control. I could be wrong here, someone else may have found a different solution. This works for this app.
>
>Steve
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform