Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Scrollbar on TreeViewNode (Read 11161 times)
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Scrollbar on TreeViewNode
Aug 10th, 2009 at 11:35pm
Print Post  
Hi Stoyo,

How can I set the internal height of the TreeViewNode so the vertical scrollbar properly reflects the contents.

As you can see in the image, the scrollable area is quite a bit larger than the contents (same issue with Table nodes - would like to stop the table scrolling if no more rows are available to be scrolled into view).

Additionally, the Expandable property is ignored e.g. I can't get the + to display on a TreeViewNode.



Tim
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scrollbar on TreeViewNode
Reply #1 - Aug 11th, 2009 at 1:50pm
Print Post  
Hi Tim,

Check the PM page. The updated version there implements Expandable for TreeviewNodes and should fix the scroll range issue.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: Scrollbar on TreeViewNode
Reply #2 - Aug 13th, 2009 at 1:16am
Print Post  
Thanks Stoyo, new dll work as expected.

I'm trying to change the cursor when the mouse is over a TreeViewItem that is underlined.

The only place I can see this being handled is MouseMove, but the event is not called the way I expect at all.

This is my starting point

Code
Select All
        private void diagramView_MouseMove(object sender, MouseEventArgs e)
        {
            PointF point = diagramView.ClientToDoc(e.Location);
            DiagramNode diagramNode = diagram.GetNodeAt(point);
            if (diagramNode is TreeViewNode)
            {
                TreeViewNode node = (TreeViewNode) diagramNode;
                TreeViewItem item = node.ItemFromPoint(e.Location);
                if (item != null)
                {
                    TableField tableField = item.Tag as TableField;
                    if (tableField.ForeignTable != null)
                        Cursor.Current = Cursors.Hand;
                }

            }
        }
 



When the MouseMove event is raised is unpredictable, basically I could move the mouse all over the TreeViewNode, and it never gets to breakpoint on 'TreeViewNode node = ...'
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: Scrollbar on TreeViewNode
Reply #3 - Aug 13th, 2009 at 2:16am
Print Post  
Ok, event does work as expected, but setting DiagramView.Cursor or DiagramView.CurrentCursor does not change cursor.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scrollbar on TreeViewNode
Reply #4 - Aug 14th, 2009 at 10:07am
Print Post  
Try setting diagramView.DrawLinkCursor.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: Scrollbar on TreeViewNode
Reply #5 - Aug 14th, 2009 at 10:32pm
Print Post  
Hi Stoyan,

Thanks for the tip, it turned out I needed to set PointerCursor for what I want to achieve (simulate a hyperlink on just the underlined nodes).

Tim
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: Scrollbar on TreeViewNode
Reply #6 - Feb 17th, 2010 at 7:39am
Print Post  
where can i find the new dll ?
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scrollbar on TreeViewNode
Reply #7 - Feb 17th, 2010 at 9:45am
Print Post  
We have already had a couple of releases since this thread was started. Have you found a similar issue in the latest version?

Stoyan
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: Scrollbar on TreeViewNode
Reply #8 - Feb 17th, 2010 at 9:57am
Print Post  
yes.. still i didn't have the scroll bar. my treelayout is very big each node has atleast 5 child up to 5 levels...
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scrollbar on TreeViewNode
Reply #9 - Feb 17th, 2010 at 10:03am
Print Post  
Call diagram.ResizeToFitItems after applying TreeLayout.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: Scrollbar on TreeViewNode
Reply #10 - Feb 17th, 2010 at 10:12am
Print Post  
Thanks for your reply. But my requirement is to expand only my current node not child and sub child node.
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scrollbar on TreeViewNode
Reply #11 - Feb 17th, 2010 at 10:24am
Print Post  
By "TreeLayout" don't you mean you have some nodes connected in a tree, and wish to expand the diagram area after calling TreeLayout.Arrange?
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: Scrollbar on TreeViewNode
Reply #12 - Feb 17th, 2010 at 10:42am
Print Post  
mmmmmm....when i click the expand (+) button i want to expand only that node not the subchild
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scrollbar on TreeViewNode
Reply #13 - Feb 17th, 2010 at 10:51am
Print Post  
Set diagram.RecursiveExpand = false if you have a tree of Expandable nodes, and not TreeViewNodes this thread was about.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: Scrollbar on TreeViewNode
Reply #14 - Feb 17th, 2010 at 10:58am
Print Post  
Stoyan thanks a lot... your so great  Cheesy
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint