Results 1 to 2 of 2
  1. #1
    Jacques_ZA is offline Member
    Join Date
    Jan 2013
    Rep Power

    Question How to scale the scrollpane's Vvalue


    It is my first time using javaFX 2 and I am having problems with the scrollPane's Vvalue.
    I am trying to keep track of the top left hand corner of the viewport because I want to render objects as I move around and I need to know the co-ordinates around the viewport.

    The current compensation I am trying to use it:

    Java Code:
    double tempX = ((scroll.hvalueProperty().get()) * CANVASSIZE) - ((scroll.hvalueProperty().get()) * scrollPaneWidth);
    double tempY = ((scroll.vvalueProperty().get()) * CANVASSIZE) - ((scroll.vvalueProperty().get()) * (scrollPaneHeight));

    But this attempt is not 100% correct.
    After this works I also scaling the scrollPane's content, so I also want to scale the x and y co-oordinates with the scale.

    Does anyone have some insight in the problem?


  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: How to scale the scrollpane's Vvalue

    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. forcing scrollpane to autoscroll
    By yemista in forum AWT / Swing
    Replies: 6
    Last Post: 05-26-2012, 07:59 PM
  2. scrollPane to handle 24 hours time
    By hariza in forum AWT / Swing
    Replies: 2
    Last Post: 10-15-2010, 05:56 AM
  3. how to add a scrollpane to Jframe
    By yaminisankar in forum AWT / Swing
    Replies: 1
    Last Post: 07-09-2009, 09:56 AM
  4. ScrollPane Issues..
    By hanifa in forum AWT / Swing
    Replies: 4
    Last Post: 09-11-2008, 08:18 AM
  5. scrollpane
    By Newb in forum AWT / Swing
    Replies: 0
    Last Post: 06-09-2008, 12:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts