Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor lost in Checkbox?
Message
 
To
30/08/1999 14:59:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00259286
Message ID:
00259329
Views:
28
Hi John,

Got it:

Add oCurrentObject property to the form.

*Timer.Timer() Event
oObject = ThisForm.oCurrentObject
thisform.drawWidth=2
thisform.CurrentX = oObject.Left - 1
thisform.CurrentY = oObject.Top + 5
thisform.box(oObject.Left + 13, oObject.Top + 20)

*CheckN.GotFocus()
thisform.oCurrentObject = this
thisform.timer1.enabled = .t.

*CheckN.LostFocus()
thisform.oCurrentObject = .null.
thisform.timer1.enabled = .f.

*Form.Unload
thisform.oCurrentObject = .null.


>Ken ---
>
>For multiple checkboxes, maybe my container idea, saved as a class, fits the bill? ;-)
>
>
>>Thanks John. The shape was my first thought too. I worked, but it didn't quite jump out at ya, so I added the timer to make it blink. Hmmm... just noticed he's using 2 checkboxes... excuse me while I make a quick trip back to the drawing board.
>>
>>>That's pretty cool. You know, I tried the obvious of putting a shape around the checkbox and turning it's visible property on and off in the checkbox got and lost focus but that didn't appear to work. Hence my container idea.
>>>
>>>One of my rules of thumb for VFP: If it don't work the way you want it, throw it into a container and do it from there.
>>>
>>>
>>>>You can also eliminate the overhead of the shape object by using the form's box() method to highlight the checkbox by using following timer.timer() code:
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Reply
Map
View

Click here to load this message in the networking platform