>>I have several pages of controls that are NOT bound to a ControlSource. I
>>only want to process each page if at least one of the values on that page
>>has changed. Is there any way to determine whether a value of a control
>>(TextBox or ComboBox) has changed?
>>
>>Thanks
>>Elyse
>
>Elyse,
>
>I was about to post almost exactly what "Fast Eddie" posted, but, as usual, he beat me to it.
>
>There was one point he made I'd take issue with. If I understood him correctly, he suggested a logical for each page to let you know whether or not a value on the page had changed. If that's the case, that's a lot unnecessary overhead. What you can do is create a numeric property on the frame or form, initially set to zero. Then create a method, passing the page number to it, as a numeric parameter to change the value. The code might look something like this:
>
>LPARAMETER pnpagenum
>
>This.PageFlags = BITOR(This.PageFlags, 2 ^ (pnpagenum - 1))
>
>When you need to find out if a value on any page has been changed, loop through the PageFlags and test using BITTEST(), like this:
>
>FOR lni = 0 TO 31
> IF BITTEST(This.PageFlags, lni)
> * Something was changed.
> ENDIF
>ENDFOR
>
>Of course, if there are more than 32 pages, you'll have to create a second set of flags.
>
>George
Ok, now having time I would extend on topic, trying to beat you again :)
IMHO, the nice solution is to have form property-array declared in Form.Init:
Dimension This.Pageflags(This.Pageframe1.PageCount)
Then in any ControlX.InteractiveChange event I would issue:
Thisform.Resetpageflags[This.Parent.PageOrder]=.t.
So, when it's going to refresh, you just scan the array for .t. elements and refresh particular page using Pages property.
Thisform.Pageframe1.Pages(n)
Edward Pikman
Independent Consultant