Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add object with procedure, programmatically in form
Message
From
08/02/2000 13:57:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How to add object with procedure, programmatically in form
Miscellaneous
Thread ID:
00329025
Message ID:
00329025
Views:
58
First Question
If I put a checkbox in a grid and then set the recordsource to
.grid1.recordsource = .grid1.recordsource
the checkbox will dissappeared. Why and how to solve it???

Second Question
I want to put a checkbox in a column(grid) programmatically,
e.g. : .grid1.column7.addobject('Check1','CHECKBOX')
The problem with the above statement is it will add a basic vfp base class of checkbox. So I tried this statement:

do program\definecheckbox.prg
Check11 = CREATEOBJECT("Check1")
thisform.grid1.column7.ADDOBJECT('chkSelect',Check11)

but, as u know the third line give error...

thisform.grid1.column7.ADDOBJECT('chkSelect',Check11)

Check11 must be in single quote

thisform.grid1.column7.ADDOBJECT('chkSelect','Check11')

but, the above statement also have error...

Class Definition Check11 is not found

So, anyone can help???

**************** definecheckbox.prg
DEFINE CLASS Check1 AS CheckBox
Caption = ''

PROCEDURE InteractiveChange

ENDDEFINE
**********
Next
Reply
Map
View

Click here to load this message in the networking platform