Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing bound control value and buffer
Message
 
 
To
17/04/2011 13:17:19
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01507653
Message ID:
01507676
Views:
41
>Hi Dmitry,
>
>I am a little confused why you need to call getfldstate() from interactivechange. The fact that interactivechange fired means that table field was changed on a bound control. Use this.value event if you need the new value. If you really need to check getfldstate() then do a setfocus() to another control and then back to this control the the field should show the change.
>

Let me describe what and why I am trying to do. On the form I have some controls (textboxes and spin controls) bound to one cursor (MyCursor1) and some bound to another cursor (MyCursor2). When user starts making changes to any control the InteractiveChange fires a method on the form. This method then disables the controls of the "other" cursor. That if, if user starts making change to a control bound to MyCursor1, all controls bound to MyCursor2 should be disabled. Until user saves the changes. So I need to find out which control's InteractiveChange fired the method. I was thinking that by finding out which cursor has pending changes. But, unless I do some "fancy footwork" I can't determine which cursor has changes. Doing setfocus() to another control does not make sense to me; since the user is in the process of making changes to a textbox and all of a sudden the focus goes to another control. So I am thinking of another way. One way, I am thinking is, to place controls bound to MyCursor1 into a container and then check OnGetFocus() which container is in focus. This way, based on the form property indicating that this or that container has focus I will determine which control fired InteractiveChange. I have to play with this approach to see how it will work.
Thank you all.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform