Print Page | Close Window

Set the Report Record Height.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=11492
Printed Date: 16 September 2024 at 7:36pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Set the Report Record Height.
Posted By: markmark
Subject: Set the Report Record Height.
Date Posted: 19 July 2008 at 4:44am

Hi

 
I have set the row record item to be multline (Item.EditOptions.EditControlStyle = xtpEditStyleMultiline)

 

So long as the row height can take the extra line, CTRL-ENTER will work OK

However if the row height is too small it will not.

I have tried trapping the PreviewKeyDown event so that when KeyCode = 13 And Shift = 2 is true  I can increase the record height.

But there doesn’t seem a way of increasing the record height, other than MeasureRow event.

 

Would there be an auto resize option to increase the record height as the text in the items grows.

 

What I’m trying to achieve, would allow the user to type into the multiline item and the cell to resize its height as the user types

 

Thanks

 

MArk

-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0



Replies:
Posted By: Aaron
Date Posted: 19 July 2008 at 6:15am
Hi,
 
This will auto scroll when adding another line of text:
 
Item.EditOptions.EditControlStyle = xtpEditStyleMultiline or xtpEditStyleAutoVScroll
 
and set:
 
wndReportControl.PaintManager.FixedRowHeight = False
 
Now it will autosize the row to its contents.
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: markmark
Date Posted: 19 July 2008 at 7:49am
Thanks again Aaron
 
That does what I wanted.
 
Q
Is there a way to change the row height via a single line of code,
other than using the MeasureRow event?
 
Mark


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0


Posted By: Aaron
Date Posted: 19 July 2008 at 9:09am
Hi,
 
The only way setting a rowheight is using the MeasureRow event, but:
 
If you set wndReportControl.PaintManager.FixedRowHeight = False the row will automatically sized to its contents. You don't need the MeasureRow event if you don't mind that rows have different heights.
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: markmark
Date Posted: 20 July 2008 at 2:18am
Hi
When you  are typing into an Item and type CTRL-ENTER the row doesn't expand to fit the text untill you click out of the item.
 
I was going to trap  CTRL-ENTER and expand the row.
Unless there's another setting?
 
Thanks for your help
 
 
MArk


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0


Posted By: Aaron
Date Posted: 20 July 2008 at 4:34am
Hi,
 
If you type into a textbox it won't autosize either, it will only scroll. Same way as you do now, with reportitem multiline. If I were you, I wouldn't put so much effort in it just to fit the contents into row. Users don't expect that it will resize, just scroll down as they type. I know it's difficult to let go when you have something in mind, but I wouldn't go this far
 
btw, I added this as possible feature to my FIXED BUGS post: have a scrollbar with multiline reportitem. Would be nicer anyway, this way you could set a certain height for every row and still see that the contents is bigger then the rowheight.


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net