How to use Scrollbar in Tree

Sep 9, 2010 at 8:53 AM
Edited Sep 9, 2010 at 12:41 PM

In my test, I want to expand many tree nodes in Explorer.exe with tree view, and each tree node is the sub tree node before. But when the folder name is not shown completely, treenode.expand() runs ok, it thows no exception, but the treenode is not expanded in the GUI. The mouse seems not be able to click on this tree node, so it should drag the scrollbar in tree to right.  How to use this scrollbar? In UISpy, the Scrollbar in Tree can not be found.

Thanks very much!

Sep 9, 2010 at 10:33 AM

Hi

 

have look on tree object

 

Snippet

tree.ScrollBars.Vertical

 

Throndorin

Sep 9, 2010 at 11:47 AM

Thanks very much, Throndorin.

For first, I have tried "treeNode. ScrollBars. CanScroll". It is always false.

Because the expanding process is dynamic, it is besser, when a supper tree node is selected,

and to decide, whether it is necessary, scrollbar to pull, in order to expand a sub tree node.

But it seems not work. This is my console information.

Tree scollbar:True 
Begin 'OpenSubFolderOfDesktop()'
The Folder '1234 - TOPP' in 'Schreibtisch' is selected! 
1234 - TOPP ScrollBars.Vertical is:False 
1234 - TOPP ScrollBars.Horizontal is:False 
The Folder '071' in '1234 - TOPP' is selected! 
071 ScrollBars.Vertical is:False
071 ScrollBars.Horizontal is:False 
The Folder '1' in '071' is selected! 
1 ScrollBars.Vertical is:False 
1 ScrollBars.Horizontal is:False
The Folder '2' in '1' is selected! 
2 ScrollBars.Vertical is:False 
2 ScrollBars.Horizontal is:False
The Folder 'übung' in '2' is selected! 
übung ScrollBars.Vertical is:False 
übung ScrollBars.Horizontal is:False
The Folder 'ä1' in 'übung' is selected!
ä1 ScrollBars.Vertical is:False 
ä1 ScrollBars.Horizontal is:False
The Folder 'übung1' in 'ä1' is selected! 
übung1 ScrollBars.Vertical is:False 
übung1 ScrollBars.Horizontal is:False 
The Folder 'übung2' in 'übung1' is selected! 
übung2 ScrollBars.Vertical is:False 
übung2 ScrollBars.Horizontal is:False Progromm läuft: 0
The tree is scrollable, each folder is the sub folder of the folder before.
But none of them is scrollable.
Sep 9, 2010 at 12:11 PM

mmh

 

ok I have looked on my machin and ScrollPattern is not implemented for Tree

so

try Scrollbars on TreeNode. becaus ScrollItemPattern is implemented for TreeNodes

 

Throndorin

 

 

Sep 9, 2010 at 12:21 PM
Edited Sep 9, 2010 at 2:36 PM

But for me, Scrollbars is avaliable for tree, not for tree node. I take the explorer.exe as the example. The scrollbar can be found through tree, but when White selects a node in this tree, for this node, treeNode.ScrollBars.Vertical und ScrollBars.Horizontal, both can be not scrollable.

or do you mind,  ScrollPattern is not implemented for TreeNode, but in Tree?

I have scrolled the scrollbar in tree now, but never in tree node.

Thanks.