>Sorry , I don't know what I am doing wrong :
>
>
>IF THISFORM.grid1.Height = 100
> THISFORM.grid1.Height = 10 <- program stop here
>ELSE
> THISFORM.grid1.Height = 100
>ENDIF
>
>
>VFP7 prompt me error message :
>
>error with grid1 - height : Expression evaluated to an illegal value.
>
>
>What wrong with my program? Try out whole day.... :(
>
>
>TIA.
Teo,
Grid.Height cannot be under 19. Sounds like your grid don't have scrollbars. Are you trying to show only header (if it has) or hide grid ?
with thisform.Grid1
if .Height = 100
.Height = max(19, iif(.Headerheight=0,.RowHeight,.HeaderHeight))
else
.Height = 100
endif
endwith
Cetin