Print Page | Close Window

[Answered] Code loop through columns/rows for h/w

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=18174
Printed Date: 28 April 2024 at 10:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [Answered] Code loop through columns/rows for h/w
Posted By: wakerunner
Subject: [Answered] Code loop through columns/rows for h/w
Date Posted: 06 April 2011 at 2:10pm
Could anybody give me a pointer on the easiest way to loop through all columns and rows to get the height and width of each cell?

-------------
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 64 bit
Language: Visual Basic 6.0





Replies:
Posted By: wakerunner
Date Posted: 06 April 2011 at 6:04pm
I came up with this, there may be better ways but this works.
 
For C% = 0 To Ctrl.Columns.Count - 1
        Cwidth = Ctrl.Columns(C%).Width
        Cwidth = Cwidth * Screen.TwipsPerPixelY
            For a% = 0 To Ctrl.Rows.Count - 1
            Call Ctrl.Rows.row(a%).GetRect(T1, T2, T3, T4)
            Cheight = T4 - T2
            Cheight = Cheight * Screen.TwipsPerPixelX
            Next a%
                        
Next C%
       


-------------
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 64 bit
Language: Visual Basic 6.0





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