Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox in grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00538180
Message ID:
00538409
Views:
14
Vlad,

I understand. It definitely did help.

Thanks,
Terry

>Hi!
>
>Addobject does not work that way, only NewObject does. In other words, use SET CLASSLIB to set VCX library into memory, than use AddObject('ObjName','ClassName'). Any extra parameter in AddObject after second parameter are parameters that are passed into the Init method of the class of that object. That is why you get that error message - VFP tries to pass
>'myclasslib.vcx' value into the Init of the checkbox, but Init of checkbox does not have any parameters.
>
>NewObject accepts addtional parameter for class library specifying.
>
>HTH.
>
>
>>Vlad,
>>
>>Could be. The code I tried without luck was:
>>thisform.grid1.column1.addobject('Check1','chkv','myclasslib.vcx')
>>and I got 'No lparameter statement found' where:
>>thisform.grid1.column1.addobject('Check1','checkbox')
>>worked fine.
>>
>>Thanks
>>Terry
>>
>>
>>>Hi!
>>>
>>>Did you meant Column.AddObject('Check1','MyCheckBoxClass','Param1','Param2'...)?
>>>I always thought AddObject works the same way fro all VFP objects... Can yu prove the behavior by a code sample? Look of this is not caused by something other than just AddObject.
>>>
>>>>In putting a checkbox in a grid column with code, just curious why the docs show 3 or 4 params and the method of the column object has two params, so must you use two? What if you don't want to use a baseclass?
>>>>
>>>>
>>>>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform