Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change grid header programatically
Message
From
13/09/2013 03:52:48
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
12/09/2013 11:42:13
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:
01583113
Views:
120
>
>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.

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