Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to add my grid class to form class gives error
Message
From
02/09/2006 08:25:36
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
02/09/2006 00:45:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01149616
Message ID:
01150498
Views:
22
Dennis,

I do have this procedure set. Like I said, things work fine up until I try to drop this grid class onto a form class.

I've since found out that if I set the grid class's column count to 0 then drop the grid class onto my form class and then at runtime set the column count to what I need, things work fine. I just can't make it work in design/visual mode.

Mike


>Mike,
>
>Before you drop in onto a form class, first do:
>
>
>SET PROCEDURE TO PrgWhichHasColumnAndHeader.prg
>
>
>Hope it helps,
>
>Dennis
>
>
>>I have a grid class that uses the MemberClassLibrary and MemberClass properties. The MemberClassLibrary points to a prg where the column class is defined and it in turn relies on a HeaderClass that is also in the same prg.
>>
>>I then drop this grid class on to a container class and set the column count to 2. The two columns appear as expected (using my MemberClass) and their headers are using the HeaderClass (again as expected).
>>
>>Now when I try to drop this container onto a form class, I receive the following error:
>>
>>"Cannot add this object to a grid"
>>
>>My only options are OK and Help. The help says:
>>
>>"You have attempted to execute the Grid.AddObject method to add an object other than a column to the grid.
>>
>>You are trying to add an object to a column, rather than adding a column to the grid.
>>
>>To add an object to a column, use the Grid.Column syntax with the AddObject method."
>>
>>Any idea where I went wrong?
>>
>>Thanks for all replies,
>>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform