Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem while painting custom row

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue Jan 03, 2006 2:31 pm    Post subject: Problem while painting custom row Reply with quote

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

PostPosted: Tue Jan 03, 2006 11:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
z00rg



Joined: 03 Jan 2006
Posts: 12

PostPosted: Mon Jan 09, 2006 7:19 am    Post subject: More issues Reply with quote

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

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Jan 09, 2006 9:23 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group