Using a editbox in the grid I would like the row height to autosize based on the data in that field so that everything displays without using the scrollbar.
You'll only be able to do this if all of the data in every record is exactly the same length, and then it would be easy enough to hard code.
Grids have only one rowheight and it applies to all rows. It isn't variable row-by-row.
You *could* use the .When or .Gotfocus of each editbox to adjust the rowheight to the current record, but it will affect the entire grid and all that flashing and resizing is just a horrible idea.
True, I second dans good advice to not go that route. I reommend you use LEFT(chrtran(memo,chr(13)+chr(10),' '),30)+"..." to display just a start of the text and display the full text in an Editbox beside the grid.
Or, if there are three lines at max, use a rowheight for three lines. If the height varies too much, forget about the grid.
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.