![]()  | 
 
Columnwidth as percent | 
 
    Post Reply  
   | 
  
| Author | |
   
   rune  
   
   Newbie  
   Joined: 19 September 2010 Status: Offline Points: 7  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Columnwidth as percentPosted: 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? 
    | 
 |
![]()  | 
 |
   
   Aaron  
   
   Senior Member  
   Joined: 29 January 2008 Status: Offline Points: 2192  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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....  | 
 |
![]()  | 
 |
    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  |