Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Header method
Message
From
15/01/2004 01:31:37
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
14/01/2004 12:20:48
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00866647
Message ID:
00867003
Views:
21
Dragan

>Are you sure you still have the old header when you add the new one?
I have experienced the disappearance of the old header as soon as new one is added - there can be only one. Did this change in VFP8? I know in VFP7 (and older) the old header vanished immediately, as soon as new one was added. For other controls in a column, yes, you can have as many as you want, but header seemed to be special.

You are right. It looks like my tested statement was wrong. I've mixed two solutions. After a closer look to my grid I saw that I remove first. ::(

So the properties need to be stored to some temporary place like an array before NEWOBJECT. This should do the trick.
with myForm.myGrid.Colum1
LOCAL ARRAY;
 laHeaderProps(2,1)
*Move the properties needed from old to new header:
laHeaderProps(1,1)= .Header1.Caption
laHeaderProps(2,1)= .Header1.FONTBOLD
*and so on

*remove old header
.REMOVEOBJECT('Header1')
.NEWOBJECT('Header2',"MyHeader","MyClass.prg")
*rename new header
.Header2.name = 'Header1'
* now we have a new header Header1!
.Header1.Caption  = laHeaderProps(1,1)
.Header1.FONTBOLD = laHeaderProps(2,1)
wait .header1.class
endwith
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform