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 

Virtualtree scrollbars problem when a node is huge

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



Joined: 06 Oct 2005
Posts: 15
Location: Regensburg, Germany

PostPosted: Tue Jan 23, 2007 3:33 pm    Post subject: Virtualtree scrollbars problem when a node is huge Reply with quote

Hello,

In my application, I'm using Virtualtree with multilines nodes (ObjectBinding). I may have so many lines in the node that the node object is actually bigger than the size of my monitor!

In such cases, the problem is that the scrolling mecanism is dead: I cannot see the last elements in my node, the vertical scrollbar simply disappear for such nodes!!

Moreover, I wish I could also have an horizontal scollbar.

It is a pity I cannot add a screenshot directly in this forum to explain the problem better.

EDIT: title changed


Last edited by Eric on Mon Jan 29, 2007 2:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Jan 24, 2007 12:58 am    Post subject: Reply with quote

The scrollbar controls the first row displayed on an integral basis. This mechanism does not allow for scrolling of items larger then the current display area. See the following thread for more detail:

http://www.infralution.com/phpBB2/viewtopic.php?t=224

Probably the best solution at the moment is to limit the height of rows. To do this you would need to calculate the best height for rows yourself and use the GetRowData event to set the RowHeight. We could look at providing a MaxRowHeight property that would allow you to use AutoFitHeight and restrict the maximum height.

Quote:
Moreover, I wish I could also have an horizontal scollbar.


You can have a horizontal scrollbar. It is just a matter of setting your column sizes so that they exceed the available display width. If you wish to size the width of the column based on the content you can do this by setting the AutoSizePolicy for the column to AutoIncrease or AutoSize.

You can email pictures to us at support@infralution.com or you can post the pictures on a photo sharing website such as www.flickr.com and include a link in your post. If you use the Img button to put the link inside a set of image brackets then the picture will be displayed in your actual post. See the following post for an example:

http://www.infralution.com/phpBB2/viewtopic.php?t=158[/quote]
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Eric



Joined: 06 Oct 2005
Posts: 15
Location: Regensburg, Germany

PostPosted: Mon Jan 29, 2007 11:16 am    Post subject: Reply with quote

As background, I am currently using one VirtualTree object ("2nd level tree") foreach row of my main VirtualTree (1st level), i.e as CellEditor. It is working pretty fine.

1) Vertical scrollbar:
thanks for the (simple) idea of using a max row height. I don't need a MaxRowHeight property, I've made my own! I had already written a getHeight method to calculate the height of my rows depending of the number of object to be displayed. I've simply add a condition "if (currentHeight > 600) currentHeight = 600;" which then creates a horizontal scrollbar in my 2nd level virtualtree. So it resolves my problem as you can see in the screenshot below: 1 scrollbar for the 1st level tree, and a 2nd for the 2nd level tree.



2) Horizontal scrollbar:
I've played with the AutoSizePolicy, but in my case, it works only on my "second level" tree, which create too much scrollbars in my display area! As I want to set the horizontal scrollbar only for the 1st level tree, I've set the column width according to the string length. Not very beautiful concept, but it works.
My main virtualtree is anchoring left and right to my form, and the AutoFitColumns property is set.
In GetCellData(), when I found a string to display greater than the current column width, I set AutoFitColumns = false; and MainColumn.Width = nameLen;

--> all problems solved.
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 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