Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 22:36

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Number of lines in a row
PostPosted: 25 Mar 2024, 18:00 
Offline

Joined: 25 Oct 2021, 10:49
Posts: 18
Is it possible to limit the number of lines in a row?


Top
 Profile  
 
PostPosted: 26 Mar 2024, 08:37 
Offline

Joined: 08 May 2014, 18:06
Posts: 663
Hello David

Please send me your grid settings.
The grid by default displays only one line of text per cell.

You can set the height of all data rows using the RowHeight and RowLines properties.

The total line height will be - Font Height * RowLines + RowHeight.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 26 Mar 2024, 11:15 
Offline

Joined: 25 Oct 2021, 10:49
Posts: 18
It is a TDBVertGridEh.
In the section for the Address, I want to limit to 5 lines, which is the space I have in the report.

According to this - Font Height * RowLines + RowHeight, I need the height for 5 lines, which would be 5 * Font Height + 4 * line spacing.
But I don't know the line spacing
Testing, I get good results with RowHeight = 3 and RowLines = 5.
But the problem is that I don't prevent the user to write more than 5 lines.
It could be done by counting the number of carriage returns and removing the text from the 5th line onwards.


Top
 Profile  
 
PostPosted: 03 Apr 2024, 22:35 
Offline

Joined: 08 May 2014, 18:06
Posts: 663
Hello

Use DataColParams.MaxRowHeight and DataColParams.MaxRowLines to limit max row height
The absolute max row height = DataColParams.MaxRowLines * FontHeight + DataColParams.MaxRowHeight.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group