Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I define a header class for my grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00621375
Message ID:
00621378
Views:
12
Put textbox and header sublasses into .PRG, say mygrid.prg
* mygrid.prg
define class MyText as textbox
name = 'MyText'
proc Click
this.Parent.Parent.click()
endproc

enddefine
define class myheader as header
name = 'MyHeader'
procedure mClick
endproc
enddefine

* Before using MyText or myheader classes, issue  
SET CLASSLIB to mygrid.prg
...
>Hi I am trying to build some grid items at runtime ie. adding columns, headers and textboxes... I have managed to define a textbox into one of my class libraries so that's OK but I can't define a header I have this so far...
>
>In my start up program...
>
>
>public myheader
>do gridsupport
>
>
>and the gridsupport prg...
>
>define class myheader as header
>name = 'MyHeader'
>procedure mClick
>endproc
>enddefine
>
>
>and in the init of my grid...
>
>
>* set columncount
>intCols = 6
>* set up the headers and control sources for the grid
>for intLoop = 1 to intCols
>.addcolumn(intLoop)
>.columns(intLoop).removeobject('Header1')
>.columns(intLoop).removeobject('Text1')
>.columns(intLoop).addobject('Header1', 'myheader')
>.columns(intLoop).addobject('Text1', 'MyText')
>endfor
>
>
>But I get the error "Class definition "MYHEADER" is not found"
>
>Any ideas?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform