Questions tagged [scrollpane]

A group that scrolls a child widget using scrollbars and/or mouse or touch dragging.

The widget is sized to its preferred size. If the widget's preferred width or height is less than the size of this scroll pane, it is set to the size of this scroll pane. Scrollbars appear when the widget is larger than the scroll pane.

The scroll pane's preferred size is that of the child widget. At this size, the child widget will not need to scroll, so the scroll pane is typically sized by ignoring the preferred size in one or both directions.

377 questions
2
votes
1 answer

Pannable WebView in JavaFX

Does anybody have an idea how to make the WebView pannable in JavaFX? I know, that WebView is a child of the ScrollPane in JavaFX, and it is possible to make a ScrollPane pannable easily. But I have no idea how to make it pannable with a simple…
SGE59
  • 37
  • 5
2
votes
0 answers

Zoomable scroll pane in JavaFX

I am trying to implement a scrollable zoom pane. I started from this example: JavaFx 8 - Scaling / zooming ScrollPane relative to mouse position. There is however one problem I have with this - the width of the lines and other objects is zoomed too,…
Piotr G
  • 959
  • 1
  • 7
  • 25
2
votes
1 answer

How to get a ScrollPane to fit all the contents of a MasonryPane

The java controller public class MainContentController implements Initializable { @FXML private ScrollPane scrollPane; public void initialize(URL arg0, ResourceBundle arg1) { Random r = new Random(); JFXMasonryPane…
mej71
  • 108
  • 7
2
votes
0 answers

JavaFX ScrollPane setVvalue() not working properly

I am testing the JavaFX ScrollPane class and realized that it is not working as I expect, I don't know why. I have the following code: public class Client3 extends Application { int indexMsg = 0; Button send; GridPane root; ScrollPane…
NHarvat
  • 31
  • 4
2
votes
1 answer

how do I add a JLabel to a specific location into my ScrollPane?

Im trying to show images and/or labels in my JPanel. The thing is, I want to show many JLabels in custom locations but currently I can only show like 4 labels. I understand I need to use ScrollPane. I have tried using it but its not letting me…
stellsh
  • 61
  • 3
2
votes
1 answer

Center GridPane Square in ScrollPane Viewport

I have a 20x20 GridPane of uniformly sized squares which is representing data from a two-dimensional array of the same size, placed in a ScrollPane such that one can use it to pan around. The width and height in pixels of the GridPane are both much…
narf0708
  • 100
  • 8
2
votes
1 answer

How to properly set up a media player javafx

I have created a media player method is javafx which is called upon startup (below is the media player). My problem is that this pauses whenever I interact with a scroll pane by dragging or by zooming the player pauses and does not start again. Why…
2
votes
2 answers

Changing thumb length from CSS in scroll pane JavaFX8

I want to shorten the thumb in the scroll panes through CSS, I have used the min, max, and pref height but it does not seem to work, am I missing something or does this edit needs to be done at another level of the container (.track or…
SergioM
  • 45
  • 5
2
votes
1 answer

Having an image "wrap around" the screen. JavaFX

Many online maps have this feature where when one reaches the left/right end of an image they find themselves looking at the opposite end. How is this implementable in JavaFX and is it compatible with a scrollPane? In addition, when wrapped around…
2
votes
2 answers

JavaFX setFitHeight()/setFitWidth() for an image used within a scrollPane disables panning

So I am creating a map in JavaFX and I would like to have the whole map visible at times. However, the issue is that after I set the imageView to fit the screen size then adding it to the scrollPane my zoom function works fine, but once I zoom in I…
2
votes
1 answer

Responsive UI-Design with a TilePane in a ScrollPane

I am trying to wrap my head around Scroll- and Tilepanes atm, and I have come upon an issue I just cant solve without a dirty hack. I have a horizontal TilePane that has 8 Tiles, and I set it to have 4 columns, resulting in 2 rows with 4 tiles. That…
2
votes
1 answer

libGDX ScrollPane with WidgetGroup instead of Table as the ScrollPane widget?

From what I understand a ScrollPane can have multiple widgets added to it by using a Table as the ScrollPane widget (this is how it is done in the ScrollPane tests within the libGDX repo). I would like to achieve something similar but would like to…
GradeRetro
  • 38
  • 4
2
votes
0 answers

How to scroll vertical ScrollPane in horizontal ScrollPane properly? (LibGDX)

I have made a horizontal pagedScrollPane according to tutorial here. Every page consists of the table with normal vertical ScrollPane. I need to scroll vertically if initial drag was vertical and scroll between pages if drag was horizontal. I…
E. Kross
  • 135
  • 1
  • 11
2
votes
2 answers

JavaFX scrollpane - horizontal panning with scroll wheel

I can trivially create a scroll pane in JavaFX that only scrolls horizontally like so: ScrollPane scroll = new ScrollPane(lcp); scroll.setPannable(true); scroll.setFitToHeight(true); scroll.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER); However,…
Michael Berry
  • 70,193
  • 21
  • 157
  • 216
2
votes
0 answers

JavaFX How do you convert coordinates (relative to the screen) to coordinates (relative to a pane)?

I'm going the coordinates of my cursor from Java.AWT.MouseInfo and I need to convert it to the coordinate relative to a ScrollPane's viewport. I'm trying to have the scrollpane's scrollbar positions center on where the mouse was when zooming…
geoxile
  • 348
  • 1
  • 6
  • 16