Rectangles with TOP or BOTTOM Round Corners

The documentation mention that we have options for setting only Top or bottom of the rectangles as rounded corner. Can anyone show a code example of this. I can’t where to put those options.

Hi @icaroleles1. Here’s a example of how you can set rounded corners for just the bottom:

ui.Rectangle(style={
    "background_color": ui.color(1.0, 0.0, 0.0),
    "border_radius":10.0,
    "corner_flag": ui.CornerFlag.BOTTOM
})

You can discover available properties and style keys using the Inspector Window extension.

Oh Thank you !

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.