Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change grid header programatically
Message
From
13/09/2013 04:21:11
 
 
To
13/09/2013 03:52:48
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01582929
Message ID:
01583116
Views:
58
Hi,
did you run the test code suggested?
? o.column1.RemoveObject('header1')
? o.column1.ControlCount && 1 - header was removed
>>
>>o = CreateObject('grid')
>>o.ColumnCount = 1
>>? o.column1.RemoveObject('header1')
>>? o.column1.ControlCount
>>? o.column1.AddObject('header1','someHeaderClass')
>>? o.column1.ControlCount
>>
>>
>>Tested OK with VFP9, don't know about VFP7
>
>IIRC this worked fine with VFP7 as well.
>
>The .removeObject() line is unnecessary, I think, because the grid always has one and only one header, so if you remove it, a new one is created automatically, and if you add one, the old one is removed. It's possible that there's a predefined slot for a header which simply holds a baseclass header unless filled with something else.
>
>Not true anymore - you can have a headerless column and if you try to add a header it will complain if it already has one (so my "single slot for header" theory still holds some ground). So the above paragraph may have applied to some earlier version of fox - 6 or 7 or thereabouts.
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform