View previous topic :: View next topic |
Author |
Message |
Guest
|
Posted: Tue Jan 03, 2006 2:31 pm Post subject: Problem while painting custom row |
|
|
Hi i am evaluating the Infralution grid, and plan to buy it in next few days.
Here is my situation.
I have overridden the OnPaint method of the RowWidget class, and i am painting my own stuff when a user expands a row.
The height of the painted row depends upon runtime, and i use base.RowData.Height to set the height of the row after painting it.
But even after setting the height of the row, its not completely visible, however the painted row soon becomes visible when you try to scroll up and down if you try to resize the window.
Please see the image...
Please suggest what i am doing wrong |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jan 03, 2006 11:00 pm Post subject: |
|
|
The problem is that VirtualTree needs to know the height of the row before it is painted.
You could either set the RowData.Height in your derived RowWidget constructor or alternatively you could set RowData.AutoFitHeight to true and the override GetOptimalRowHeight method to return the desired height. _________________ Infralution Support |
|
Back to top |
|
|
z00rg
Joined: 03 Jan 2006 Posts: 12
|
Posted: Mon Jan 09, 2006 7:19 am Post subject: More issues |
|
|
Thanks, i was able to set the height of the custom, by setting AutoFitHeight to true and then by overriding GetOptimalRowHeight and it works...
Now i have two issues-
1> GetOptimalRowHeight is being called twice for each row.(May cause performance issues for me....as i am pre calculating the height)
2>Scrolling behavior is not proper, when i scroll up or down the custom painted rows which have more height, they scroll unevenly, they are cases when a custom painted row has more height than the virtual tree window, then the scrolling stops altogther.....pls help!
I think scrolling should be possible even if a custom painted row has more height than the height of the window.
Pls refer to the images
|
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Jan 09, 2006 9:23 am Post subject: |
|
|
Quote: | 1> GetOptimalRowHeight is being called twice for each row.(May cause performance issues for me....as i am pre calculating the height) |
This is necessary because of the interactions with AutoWidth cells.
Quote: | 2>Scrolling behavior is not proper, when i scroll up or down the custom painted rows which have more height, they scroll unevenly, they are cases when a custom painted row has more height than the virtual tree window, then the scrolling stops altogther.....pls help! |
See the following thread in Feature Requests:
http://www.infralution.com/phpBB2/viewtopic.php?t=224 _________________ Infralution Support |
|
Back to top |
|
|
|