EhLib.Com
https://forum.ehlib.com/en/

Auto row height for text field
https://forum.ehlib.com/en/viewtopic.php?f=5&t=965
Page 1 of 1

Author:  mierlp [ 17 Feb 2019, 00:16 ]
Post subject:  Auto row height for text field

hi

I'm would like to set the rowheight automaticly for displaying
the text of a blob or text field. (mysql table)

- OptionEh.AutoFitRowHeight = True
- OptionEh.FitRowHeightToText = Treu
- RowSizingAllowed = true
- DrawMemoText =true

But nothing seems to work ..

Author:  EhLibSupport [ 20 Feb 2019, 16:47 ]
Post subject:  Re: Auto row height for text field

Hello

1. You should use dghAutoFitRowHeight in OptionsEh to make grid calculate row height depending on the text.
2. This mode works only when the grid is connected to the DataSet of TMemTableEh.

Quote:
> "EhLib Users Guide.doc"
Individual height of each data row.
TDBGridEh can work in mode when the height of every row is calculated dynamically depending on the text in the grid cells or size of image in the cell (When DrawGraphicData value is True). Include dghAutoFitRowHeight in OptionsEh property to force grid to calculate height for every row. This mode works only when the grid is connected to the DataSet of TMemTableEh type and TMemTableEh is not in TreeView mode. When dghAutoFitRowHeight is included, grid calculates the height of the row dynamically using cell text (TColumnEh.WordWrap property also influence it) and for column the fields of which have ftGraphic type. To avoid surplus recalculation, grid recalculates heights, but not for after every change of properties. For instance, grid does not update heights if the Font property was changed. In such cases it is necessary to call UpdateAllDataRowHeights method. For more flexible calculation of the heights the grid has an OnGetRowHeight event, in which you can specify the height of row. During the event calling, the MemTableEh positions on record and we can calculate the height of this record, so you can use MemTableEh properties to access fields values.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/