1

My problem is described in the picture below. I just want to set the label to be "..."-ed on the left side and not on the right since this is the more important part. As of the code I could show you how I set my label (but that shouldn't really matter):

final Label directory = new Label();

directory.setText(selectedDirectory.getPath());

Problem

James_D
  • 201,275
  • 16
  • 291
  • 322
iPh1ps99
  • 97
  • 1
  • 7

1 Answers1

2

You can do

directory.setStyle("-fx-text-overrun: leading-ellipsis;");

or, in an external style sheet:

.label {
    -fx-text-overrun: leading-ellipsis ;
}
James_D
  • 201,275
  • 16
  • 291
  • 322