I’m trying to get this done on TMS Web Core via Delphi code using.
procedure TForm1.WebFormCreate(Sender: TObject);
begin
pnlPersonalInfo.Margins.Left := 15;
pnlPersonalInfo.Margins.Top := 15;
pnlPersonalInfo.Margins.Right := 15;
pnlPersonalInfo.Margins.Bottom := 15;
phone.HTML.Text := GetBootstrapIcon('telephone-fill', 24, '#576A33');
email.HTML.Text := GetBootstrapIcon('envelope-fill', 24, '#576A33');
location.HTML.Text := GetBootstrapIcon('geo-alt-fill', 24, '#576A33');
web.HTML.Text := GetBootstrapIcon('globe', 24, '#576A33');
Github.HTML.Text := GetBootstrapIcon('github', 24, '#576A33');
end;
pnlPersonalInfo
is the TWebPanel that I want to give rounded corners.
2
Answers
You can give any component rounded corners by using inline CSS. Here are three examples:
If you’re using Bootstrap, then you can use the official Bootstrap Border Classes.
You can add the classes to the
ElementClassName
property on the panels. Here are some examples of where I’m styling panels to have rounded corners and be blue using Bootstrap classes:You can also adjust the rounded sizes like in the following examples:
There are also some other class variations from Bootstrap 5.3+ such as: