Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

like image 341
user2361460 Avatar asked May 15 '13 12:05

user2361460


People also ask

How do you round the edges of a JavaFX rectangle?

JavaFX - 2D Shapes Rounded Rectangle By default, JavaFX creates a rectangle with sharp edges unless you set the height and width of the arc to +ve values (0<) using their respective setter methods setArcHeight() and setArcWidth().

Which property in CSS allows you rounded corners for an element?

The border-radius property defines the radius of the element's corners. Tip: This property allows you to add rounded corners to elements!

What is rounded corners in CSS?

CSS3 Rounded corners are used to add special colored corner to body or text by using the border-radius property.A simple syntax of rounded corners is as follows − #rcorners7 { border-radius: 60px/15px; background: #FF0000; padding: 20px; width: 200px; height: 150px; }


1 Answers

.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. */
}
like image 144
tonimaroni Avatar answered Sep 22 '22 15:09

tonimaroni