Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5 - How to know that a txt.value has changed
Message
 
À
11/06/2003 13:31:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00797581
Message ID:
00799240
Vues:
30
Thanks

>I think that at one time the help suggested that this be used as a comment property. Whatever the reason it has proved useful on a few occations. I just started a small, quick and dirty utility that will only be used for a couple of weeks and am using the tag to compare values for checkboxes in a grid. I am toggleing save and cancel buttons based upon the value being changed. It's a quick and easy alternative to CurVal and OldVal or GetFldState. Just remember that it will only store character or string data and treat it appropriately.
>
>>Thanks for the idea Jeffery. This is as good as creating a custom property and then comparing in the lostfocus(), just that this one is already created. Just curious, why was it there in the first place.
>>
>>>The tag property is on the data tab of the property sheet. It is a property that can store text data, like a comment but you can store a value there during gotfocus and compare that value during lostfocus. This way, even if the user changes the value but puts it back it will show the value as unchanged (unlike GetFldState). The only drawback is that you can only store text data there so you must convert other data types to text before storing and comparing.
>>>
>>>hth jeffrey
>>>
>>>>Textbox's Tag? Tag Please advise.
>>>>
>>>>>On the textbox's gotfocus, assign the value to the textbox's tag. On lost focus, compare the tag to the value.
>>>>>
>>>>>
>>>>>>>Just keep in mind though, that GetFldState(), InteractiveChange(), and ProgrammaticChange(), tell you that the field has been messed with. They don't really tell you if the value is different than it was coming in.
>>>>>>
>>>>>>Yes I have put it in the LostFocus() and I just wanted to know if the user modified once just to set a portion of the screen in a diff. color to get the users attention that save will be required.
>>>>>>
>>>>>>>
>>>>>>>If you truly want to know if the value is changed, you need to do your own comparisons.
>>>>>>>
>>>>>>>Alan
>>>>>>>
>>>>>>>>Thanks a lot David.
>>>>>>>>
>>>>>>>>>GetFldState()
>>>>>>>>>
>>>>>>>>>>I wanted a quick & efficient way to find out if say for eg. the text in a textbox / cbo or the status of a checkbox has changed.
>>>>>>>>>>
>>>>>>>>>>The controlsource for all these controls will be a view.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform