Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling checkbox in my own class
Message
From
10/11/2011 13:39:44
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01528570
Message ID:
01528578
Views:
68
In InterActiveChange:
NoDefault 
Do case 
  Case IsNull(this.nValue)
    this.Value=1
  Case this.nValue=1
    this.Value=0
  Otherwise 
    this.Value=.Null.
EndCase
>Sergey
>
>thanks for your quick reply.
>
>Actually, I don't want to completely create my own checkbox, but I was hoping that I might be able to modify the behavior of the native one.
>
>For example, I like the three choices: .NULL., .T., or .F. But, if the control is currently .null., clicking it switches it to .F. I would like it to switch to .T. Another possibility is to make the state conditional on something else.
>
>So, any way to do this?
>
>Jim
>
>
>>>I am developing a Checkbox class. Among other things, I want to be able to control when the box gets checked, unchecked, or reset to null.
>>>
>>>Under the debugger, I can see that the state of the checkbox has already been modified by the time it reaches the checkbox Click and InteractiveChange events. However, The state has not been modified by the time we reach the GotFocus event.
>>>
>>>How can I override VFP's default handling of the checkbox control, and check, uncheck, or reset to .NULL. in my own code.
>>>
>>
>>It sounds like you want to create your own checkbox w/o using native one.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform