Scrolling Panel Issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Josh Argent
    New Member
    • Dec 2010
    • 28

    Scrolling Panel Issues

    Hi,

    I'm making the second version of my brainstorming and mind mapping software, Open Mind. The way it works simply is that a bubble control is inside a panel and can be dragged around the panel and joined to other bubbles to make a mind map.

    This works pretty well however an on-going issue is that when working on a large mind map and the panel needs to scroll (With allowscroll set to true). This is fine but when it comes to saving a mind map the location of some of the bubbles are off the panel with negative x and y values.

    Example:

    The bubble is in the centre of the panel, there is no scrolling and everything fits on the page.


    The bubble is off of the page because the panel has scrolled. Problem is it's location is negative and has changed. I need a way to calculate its normal x,y coordinates.

    I'm wondering if there is a way to overcome this?
  • Josh Argent
    New Member
    • Dec 2010
    • 28

    #2
    I've fixed it:
    Code:
    Dim newl As Point = New Point(control.X + Panel1.HorizontalScroll.Value, control.Y + Panel1.VerticalScroll.Value)
    Use newl as the location of the control. Not it's normal location.

    Comment

    Working...