Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid Editbox Row Height

Status
Not open for further replies.

keepsafe

Programmer
Sep 22, 2009
14
US
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.

Thanks
 
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.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top