Override WebRectangle to have Square Corners?

Is there a way to force an individual WebRectangle to have square corners without changing the theme for buttons and other square objects rounded corners?

I put this in the Opening() event of a WebRectangle and it seems to do the trick:

Me.Style.Value("border-top-left-radius") = "0rem"
Me.Style.Value("border-top-right-radius") = "0rem"
Me.Style.Value("border-bottom-left-radius") = "0rem"
Me.Style.Value("border-bottom-right-radius") = "0rem"

Try

me.Style.Value("border-radius") = ""

Both of those work. THANKS!

Those could be problematic, the “correct” way to do it, is to use the built in classes in the CSS framework:

Try adding this in the opening event of the rectangle:

Me.ExecuteJavaScript("document.getElementById('" + Me.ControlID + "').classList.add('rounded-0');")

1 Like

Correct is what I was aiming for so thanks for this Ivan. It seems less likely to break in a future release this way.