Question: Resize control to show all rows. |
Post Reply |
Author | |
keepITcool
Groupie Joined: 08 April 2009 Status: Offline Points: 36 |
Post Options
Thanks(0)
Posted: 21 March 2010 at 4:03pm |
Hi, need help!
I have a control populated with a varying number of rows, some of which may have preview items...
I want to resize the control (within limits) to fit the rows...
How do i do this with some degree of simplicity... In other controls(IGrid) I used the scrollbars.. reisze until they are no longer displayed. In CJ I can't find scrollposition of bar visibility... I've experimented with .rows(.rows.count-1).GetRect, but can't get it to work
Ideas (or code..) welcome.
|
|
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0 Platform: WinXP/Win7(32+64bit) |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I found a solution, although it isn't pretty!
Assuming that you aren't already using SetCustomDraw with either of the measurement flags for other purposes, it is achievable. The main problem is that non-visible rows don't return values when you call GetRect, but you can use SetCustomDraw xtpCustomMeasureRow + xtpCustomMeasurePreviewItem, and then step through the rows to get all of the required heights. There may be a better way to do this (I hope there is!), but this is what I came up with (put this code in a form with a ReportControl named ReportControl1):
Now that I think about it a bit more, you might be able to just loop through the report and use the Row GetRect method (and skip the whole SetCustomDraw event stuff), but this code should at least point you in the right direction. Hope it helps! |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |