Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing headers in VFP7
Message
 
 
To
29/10/2001 18:12:07
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00574795
Message ID:
00575354
Views:
24
>I recompiled my application in VFP7 and now I'm running into problems. It works fine from the command window, but I'm getting errors in my exe. When I RightClick on a grid and select Edit from the menu, it is supposed to bring up another form but instead I get an error saying "File 'HDR1' does not exist." The only time I use 'HDR1' is when I instantiate my header class, in the init of my grids. For each column, the code looks something like this:
> loCol.AddObject("Hdr1",This.cHeaderClass,lcCaption,lnAlign)
> loCol.Hdr1.Name="Header1"
>I don't understand why RightClicking on a textbox in the grid should have anything to do with this, but I can't find any other source. Any help would be greatly appreciated.
>
>Thanks,
>Elyse

Hi Elyse,

Here is the code, I use for the same situation:
for each loColumn in .grdIndxDict.columns
	lcCaption = loColumn.Header1.caption
        lnI = m.lnI+1
	loColumn.newobject('Header2','myheader','myheader.prg',,m.lcCaption)
	loColumn.Header2.name='Header1'
	loColumn.Header1.cTagName = tag(m.lnI)
next
Can you use another name, say, Header4? Just to check, if this problem goes away...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform