Column sizing |
Post Reply |
Author | |
schwinn
Groupie Joined: 17 April 2009 Status: Offline Points: 12 |
Post Options
Thanks(0)
Posted: 09 June 2010 at 10:35am |
Hi
Really struggling here and dont know what I'm doing wrong. My report column is not setting the correct size. Let me explain...
We have 2 related views in an application. We make changes in one view and it affects the other view, the results view. The results view is my report control, consisting of 39 columns of selectable results. By default we only have 6 selected. We dont want last column expanded, we want each column to be best fit or if the user has manually resized the column then that column stays that width.
The results view has on activate code that;
1. ResetContent
2. Put the rows of data into all the columns.
3. Populate.
4. I then iterate each column each column and do GetReportHeader()->BestFit(pCol), unless the column has been manually sized.
My Problem.
1. Make changes in the first view, lets say make a text string long.
2. Switch to the results view.
3. Select the column to make visible (the column that has a long text string)
4. Problem...the column is now wide enough for the data, it shows ... on the string.
5. I switch back to the other view and switch back again to the results view and the column is now wide enough, the ... has gone.
Can anyone tell me why this happening, why im getting the .... I want it to be the correct width to start with
Thanks for any help
|
|
schwinn
Groupie Joined: 17 April 2009 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Solved the problem by forcing a repaint
m_wndReport.SendMessage(WM_PAINT, 0, 0);
Believe the problem to be something to do with m_nMaxItemWidth
|
|
Michl
Senior Member Joined: 14 September 2007 Status: Offline Points: 138 |
Post Options
Thanks(0)
|
I think it is more nice to call
m_wndReport.RedrawControl(); |
|
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 |