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 

Auto-adjust row height

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



Joined: 04 Apr 2005
Posts: 69

PostPosted: Tue Apr 12, 2005 3:18 pm    Post subject: Auto-adjust row height Reply with quote

I'll try again - not sure whether this behaviour is already achievable?

When wordwrap is enabled (and autosizepolicy on the columns is manual), it would be nice if the rows automatically and individually adjusted their height according to content, so that entire multiline items could be shown.

AutoSize on the column works most of the time, but not with very long text nodes.

The manual row height adjustment is not very useful right now, because an adjustment always affects all rows. Or am I missing something?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Apr 12, 2005 11:25 pm    Post subject: Reply with quote

Allowing for different height cells is rather difficult because of the data driven nature of VirtualTree. The visual representations of each row are created on the fly rather than upfront (hence the great performance with large datasources). The drawback is that there is no way to know upfront the total height of all rows and so handle things like scrollbars appropriately.

Having said that I can see why you'd like this and we will definitely consider it for the next major release.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Aug 12, 2005 4:00 am    Post subject: Reply with quote

Version 2.0.0 has now been released and includes support for setting the height of individual rows. You can still set the default row height (affecting all rows) by holding down the control key when resizing rows.

Version 2.0.0 also includes the ability have the height of rows automatically calculated to fit the contents (by setting the AutoFitHeight property of the RowBinding).
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
MHB



Joined: 04 Apr 2005
Posts: 69

PostPosted: Fri Aug 12, 2005 10:32 am    Post subject: Reply with quote

You have no idea how good your timing is! I planned on following up on this issue today, because I really need it now. But, seeing the nice and usable new features of v2, I will stick to a satisfied thank you Very Happy
Back to top
View user's profile Send private message
MHB



Joined: 04 Apr 2005
Posts: 69

PostPosted: Tue Aug 16, 2005 11:16 am    Post subject: Reply with quote

After working a bit with the automatic row height adjustment, it looks like it isn't invoked quite often enough. Actually, it looks like the row height is only adjusted when expanding an item, and then only for all the existing rows (not the new child rows). The result is that when an item is expanded, the row heights of all the new subitems are not updated before some item is expanded.

This can be verified on the very first display of the tree, where the root row is already expanded, but none of the row heights are auto-adjusted (not even the root row, if shown).

Is this a general problem, or a result of my overriding some protected method?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Aug 16, 2005 10:21 pm    Post subject: Reply with quote

You are right there does seem to be an issue when you expand child rows that have AutoFitHeight set. Forcing a layout (by moving the vertical scroll or resizing the control) does get the heights right. We will get a fix out for this ASAP.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Aug 18, 2005 3:48 am    Post subject: Reply with quote

This issue has now been fixed in Version 2.0.1
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
MHB



Joined: 04 Apr 2005
Posts: 69

PostPosted: Mon Aug 22, 2005 2:55 pm    Post subject: Reply with quote

That helped, but now it looks like AutoFitHeight for rows is invoked before the procedures that resize the columns if needed! This should be the other way around, I think... The result may be that rows are higher than needed, because column widths may be increased afterwards.
The interaction between column and row resizing is a bit complex, but it would seem to me that it would work if columns are resized first, then rows.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Aug 22, 2005 10:45 pm    Post subject: Reply with quote

Are you using an SizePolicy of AutoIncrease or AutoSize for the column and combining that with auto height rows? This probably was not a scenario that was envisioned. Let us know if this is what you want and we will have a look at that.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
MHB



Joined: 04 Apr 2005
Posts: 69

PostPosted: Tue Aug 23, 2005 9:47 am    Post subject: Reply with quote

That's exactly it. AutoSize, if it matters.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Aug 31, 2005 3:31 am    Post subject: Reply with quote

Version 2-0-2 has now been released. It should solve your problems with AutoSize columns interacting with AutoFitHeight rows.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
MHB



Joined: 04 Apr 2005
Posts: 69

PostPosted: Mon Sep 05, 2005 4:47 pm    Post subject: Reply with quote

Nice - indeed it works!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Feature Requests 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