Jump to content

How to set a border around a TUnimImage?


likemike

Recommended Posts

29 minutes ago, likemike said:

I've tried it with css, but still doesn't work.

Hello,

Try this approach.

1. CustomCSS:

.borderImg img {
  border: green;
  border-style: solid;
  border-width: 2px;
}

2. 

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  with UnimImage1.JSInterface do
    JSConfig('cls', ['borderImg']);

end;

 

Link to comment
Share on other sites

  • 2 months later...
On 3/23/2021 at 1:07 AM, Sherzod said:

Hello,

Try this approach.

1. CustomCSS:


.borderImg img {
  border: green;
  border-style: solid;
  border-width: 2px;
}

2. 


procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  with UnimImage1.JSInterface do
    JSConfig('cls', ['borderImg']);

end;

 

void __fastcall TMainmForm::UnimFormCreate(TObject *Sender)
{
UnimImage1->JSInterface->JSConfig("cls","['borderImg']");
}

Link to comment
Share on other sites

×
×
  • Create New...