Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids without headers
Message
De
09/02/2006 18:16:25
 
 
À
09/02/2006 18:13:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01095291
Message ID:
01095309
Vues:
12
This message has been marked as the solution to the initial question of the thread.
>>>>Hi Don,
>>>>
>>>>Set the header height property to 0, that should do it.
>>>>
>>>>
>>>>
>>>>>Is there a way to display a grid without a header? If so, what's required?
>>>>>
>>>>>Thanks
>>>
>>>Thanks Don, unfortunately I tried that and it didn't work. There must be another setting that needs changed.
>>
>>I think you'd better try that again. Setting the Grid.HeaderHeight=0 is all you should need. You might need to do it in the Grid.Init, but that's the only setting that needs to change.
>
>OK, I found the problem, but I don't understand it. I set the headerheight to 0 in the property sheet and also in the init of the grid. Set the captions of the columns to (none) and still I was getting a header. My form is a scaleable form that resizes itself and its controls to match the user's screen resolution. The resize method contains the folowing code:
>
>
>with toObject
>	if type('.HeaderHeight') = 'N'
>		.headerheight = .headerheight * lnScaleH
>	endif	
>endwith
>
>This code is called by the init of all the controls on the form including the grid. You would think that since the initial headerheight is 0, the resultant headerheight would also be 0. But this appears to not be the case because the grid does end up with a header. However, if I follow the call to resize in the grid's init with another line to reset the headerheight to 0, it works fine.
>
>Thanks for your help.

Possibly the reason is that the headerheight may not actually be set until the grid is made visible. Forms can work like that in some cases, so maybe grids do too.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform