Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Checkboxes
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00403092
Message ID:
00403198
Views:
12
>I'll add a checkbox as a grid column's controlsource during the grid's init() using this code:
>
>With This.grcPrice
> .addobject("chkPrice","checkbox")
> .sparse=.f.
> .currentcontrol="chkPrice"
> .chkPrice.caption=""
> .visible=.t.
>Endwith
>
>I was wondering why the checkbox is visible, but readonly, when I don't include the ".visible=.t." code. I know that VFP hides controls added with ADDOBJECT(), but why is it visible if I leave that command out? Shouldn't the box not even show up?

I'm not certain of this, but I suspect that making it the CurrentControl might make it visible. If you find the behavior disconcerting, issue a thisform.lockscreen = .t. before adding the control, and a thisform.lockscreen = .f. when everything is set.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform