Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I create a checkbox in a grid column at runtime?
Message
From
30/04/2002 09:08:03
 
 
To
30/04/2002 08:48:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00650796
Message ID:
00650808
Views:
16
Cetin ---- your suggestion works great! Thank you!!

Joe



>>I'm working on an application written in VFP 5.0 and have a grid on a form which I create at runtime. I need to change the controlsource to checkbox instead of textbox (see code below)
>>
>>THISFORM.grid1.ADDCOLUMN(2)
>>THISFORM.grid1.COLUMNS(2).NAME = 'colBox'
>>THISFORM.GRID1.colBox.WIDTH = 30
>>THISFORM.grid1.colBox.HEADER1.CAPTION = ''
>>THISFORM.grid1.colBox.HEADER1.ALIGNMENT = 2
>>THISFORM.grid1.colBox.currentcontrol = 'Check1'
>>
>>My code errors out on the last line. What am I doing wrong?
>>
>>Thanks,
>>
>>Joe
>
>with THISFORM.grid1
> .AddColumn(2)
> with .COLUMNS(.columncount)
>  .NAME = 'colBox'
>  .Controlsource = "myTable.myLogicalField"
>  .WIDTH = 30
>  .HEADER1.CAPTION = ''
>  .HEADER1.ALIGNMENT = 2
>  .AddObject('Check1','CheckBox')
>  .Check1.Caption = ''
>  .Check1.Visible=.t.
>  .currentcontrol = 'Check1'
>  .Sparse = .f.
> endwith
>endwith
>
>Cetin
Previous
Reply
Map
View

Click here to load this message in the networking platform