This discussion is archived
3 Replies Latest reply: Jun 24, 2013 7:59 AM by David Grieve RSS

Setting size in CSS

Martin Valenta Newbie
Currently Being Moderated
Does anyone know why it is not possible to change the size property using something like "-fx-pref-width"?

I want to do something like this:
root.setPrefWidth(500);
I tried:
root.setStyle("-fx-pref-width: 500;");
but it doesn't work.

Any suggestion/explanation/another way to do it in CSS? How do you specify the size when you are using CSS?

Edited by: 899666 on Dec 5, 2011 4:45 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points