Artem Ruchkov
Artem Ruchkov

Reputation: 581

ImageView with AnchorPane resizing

I use Scene Builder 1.1. I added ImageView with Image on AnchorPane, and i want it resizes together, but point "resize" in the ImageViewsproperties is inactive.. as the result all controls which are on the ImageView dont resize too.. Didt find answer, despite questions are ease..

Upvotes: 0

Views: 1965

Answers (2)

chooks
chooks

Reputation: 704

You could also try binding the ImageView fitWidth/Height property to the anchor pane width and height:

AnchorPane pane = new AnchorPane();
ImageView view = new ImageView();

view.fitWidthProperty().bind(pane.widthProperty());
view.fitHeightProperty().bind(pane.heightProperty());
  • chooks

Upvotes: 2

Magcus
Magcus

Reputation: 866

You will have to create your own listener for when the parent pane is resized, and then implement the resizing of the imageview on that listener.

Upvotes: 0

Related Questions