Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newobject(..., 'column') errors when building a grid
Message
From
01/11/2006 16:33:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00900417
Message ID:
01166389
Views:
15
>Hello Dragan!
>
>I'm here again... I tried to find a workaround, but no success...
>
>I'm creating a wizard to help me design forms. So, I need to create my grids (and columns, of course) in design mode.
>
>If you have some time, please, try to find that precious code... If you are busy, no problem!

I'm actually using a workaround. Goes like this:

In design time, I use a grid with regular columns. Set it to whatever number of columns I need, set properties to it etc.

When done, I generate code for grid's init, which will do the .newobject() for each column as we need it, while preserving any other code that may have been there. I'm actually doing

lcInit=getpem(oGrid, "init")
lcOldCode=strextract(lcInit, hPrefixLine, hPostfixLine)
lcInit=strtran(lcInit, lcOldCode, "")
oGrid.WriteMethod(init, stuff(lcInit, at(hPostfixLine, lcInit), lcNewCode)
oGrid.columncount=0

So in design mode I'm using the regular baseclass columns, and in the end killing all the columns, and adding code to create them at runtime.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform