>>>
Hot tracking checkbox no longer transparent Thread #
1235262 Message #
1235262>>
>>Is it so hot a topic? :)
>
>Hi Naomi! How's life?
>
>Yes, actually, the hot-tracking topic is hot for me and no one has replied yet to the original message. I'm currently busy with a next version of Clickwork. And of course, it should be done in vfp9. However, the hot-tracking issue is really kind of a showstopper for me. If there ain't some nice solution for that problem, I might eventually decide not to upgrade Clickwork to vfp9 at all. So, for me it's hot indeed. :)
Peter:
It seems that you can't do it with checkboxes in VFP9, because of the way it handles colors with themes. How about thinking outside the checkbox
(pun!). If you use command button instead, you can get very close to the same behavior you had with checkboxes in VFP7. The only difference I see is that after you click the button, it stays a bit raised rather than flattening out back into the screen. That part is your homework assignment <g>.
COMMAND BUTTON:
Click() -event:
(NOTE: I establish This.Down -property on-the-fly, but of course you should bind it to data)
IF TYPE('this.Down') = 'U'
This.AddProperty('Down',.T.)
ELSE
This.Down = !This.Down
ENDIF
IF This.Down
this.VisualEffect= 2
This.Down = .T.
This.Themes = .T.
ELSE
This.VisualEffect = 0
This.Down = .F.
This.Themes = .F.
this.BackColor = RGB(255,255,128)
This.SpecialEffect= 2
ENDIF
MouseEnter() -event:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
IF TYPE('This.Down') != 'U'
IF This.Down
this.VisualEffect= 2
this.BackColor= RGB(192,192,192)
ENDIF
ENDIF
MouseLeave() -event:
LPARAMETERS nButton, nShift, nXCoord, nYCoord
IF TYPE('This.Down') != 'U'
IF This.Down
this.BackColor = RGB(255,255,128)
ENDIF
ENDIF
Cheers!