Hallooo ...
I Have a problem about grid control
I want to display grid header caption in two line or more. because the information on that column need more words.
How to create grid header caption two line or more ?
Increase the .HeaderHeight property of the grid, (19 is default), and place a label(s) over the column(s) of the header(s) in which you want to have more than one row.
Set the .WordWrap property of the label to .T. and enter the caption.
If there is code in the .Click() event of the header, call it from the .Click() event of the label.
Hi,
I think GRID.COLUMN.HEADER does not have WordWrapt property
Rudi,
This is one of the solutions:
- Set GRID.HeaderHeight to high enough
- All of GRID.COLUMN.HEADER.Caption=""
- Create a LABEL and put it at the header, Set thisLABEL.BackStyle = Transparent
Now , thatLABEL has WordWrapt property
* Others is
- Set GRID.HeaderHeight = 0
- make a FALSE header
If My header caption change with label the grid not working properly. Because if the grid with multiple column and the grid is scrool and the column is change, the header caption is not in position .
Not too sure if I understand your problem, but you need to make sure that .Label1.Height is the same as Grid1.HeaderHeight, (say 40, 2 row label) and that .Label1 is placed exactly over the .Grid1.Coumn1.Header1, so masking the header.
The label then won't interfere with the workings of the grid.
There is a problem with these solutions. Note: I don't have VFP7.
When I scroll to the right or left, the label moves with the column. But, if the label ever goes out of sight, it does not appear when I scroll back over the column.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.