Print Page | Close Window

Columnwidth as percent

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=17280
Printed Date: 06 July 2024 at 1:45am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Columnwidth as percent
Posted By: rune
Subject: Columnwidth as percent
Date Posted: 19 September 2010 at 3:26pm
Hey I am wondering if there is possible to set column width as a percent value of the controls width.

The reason I want to do this is that we are replacing a older list component with ReportControl witch use percent to define column width and I am hoping to reuse all those settings.

I have tried with calculating column width manually but it didn't work.

Does anybody have any tip?



Replies:
Posted By: Aaron
Date Posted: 21 September 2010 at 4:42am
Hi,
 
Did you set AutoColumnSizing = True?
 
 
 
With Me.wndReportControl
        .AutoColumnSizing = True
        With .Columns
            With .Add(.Count, "Col 1", Me.wndReportControl.Width / 100 * 10, True) 'Should be +/- 10%, right?
                '.blabla = ...
            End With
        End With
End With
 
If you set AutoColumnSizing = True, RC will resize column according the "original width" you assigned. If you don't allow columnsizing it will be the same percentage all the way.
 
 
 


-------------
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