Top-left and -right corner rounded in Javafx/CSS


Question

I would like to create a Pane with 2 rounded corners top-left and top-right, how can i do this in javafx? I know that u can use "border-top-left-radius" in normal css but it wont work under javafx. Until now I tried:

.calendar {
    -fx-border-top-left-radius: 10px; 
    -fx-border-top-right-radius: 10px; 
}

Thanks in advance,

Zombie

1
18
5/15/2013 12:18:17 PM

Accepted Answer

.calendar{

  -fx-border-radius: 10 10 0 0;
  -fx-background-radius: 10 10 0 0;

  /* top-left, top-right, bottom-right, and bottom-left corners, in that order. */
}
36
5/15/2013 2:45:21 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon