![]() |
Column autosize |
Post Reply
|
| Author | |
@lin
Groupie
Joined: 20 September 2006 Status: Offline Points: 19 |
Post Options
Thanks(0)
Quote Reply
Topic: Column autosizePosted: 12 January 2007 at 6:15am |
|
Hello
I want to have a column with autosize, but not in the way autosize works for this control. What I need is that the size of the column to be calculated so that every item to be visible. It is the same like doubleclicking the edge of the header. Can this be done via some funcions implemented in the control or do i have to calculate the size myself? Thank you |
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 January 2007 at 10:38am |
|
Hi,
There is a method Column.BestFit which adjusts a column size like you wish. Method which will adjust all columns size:
Call it from Form_Resize and disable regular column autosizing in Form_Load (.AutoColumnSizing = False) -- WBR, Serge |
|
![]() |
|
@lin
Groupie
Joined: 20 September 2006 Status: Offline Points: 19 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 January 2007 at 3:42am |
|
Thanx for your answer. Unfortunatelly it does not work. I have Xtreme Suite ActiveX Controls v10.3 and the method is unavailable for this version.
|
|
![]() |
|
@lin
Groupie
Joined: 20 September 2006 Status: Offline Points: 19 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 January 2007 at 3:44am |
|
Also I want this only at first (when filling the grid) and not on resize. Like i said, i want something similar to dblclick on column edge but calable from the code.
|
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 January 2007 at 3:54pm |
|
Hi,
What is not working? AFAIK method .BestFit was available since the very early versions of the control. -- WBR, Serge |
|
![]() |
|
@lin
Groupie
Joined: 20 September 2006 Status: Offline Points: 19 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 January 2007 at 3:43am |
|
For example this line:
wndReportControl.Columns(i).BestFit Method BestFit is not recognized. It is not available in help also. |
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 January 2007 at 4:35pm |
|
Oops, sorry, BestFit() was added in version 10.4 only. I've mixed it up with MFC version, where it was available from the very beginning...
-- WBR, Serge |
|
![]() |
|
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 |