Jump to content

Border on UnimPanel


likemike

Recommended Posts

Hello!

Sherzod has given me a good tipp for painting a frame around an UnimImage:

.borderImg img {
  border: red;
  border-style: solid;
  border-width: 4px;
}

Now I need the same for an UnimPanel. I've tried this, but without success:

.borderPanel panel {
  border-color: red;
  border-left-width: 4px;
  border-top-width: 4px;
  border-right-width: 4px;
  border-bottom-width: 4px;      
}

Any help would be apreciated!

Link to comment
Share on other sites

24 minutes ago, likemike said:

Now I need the same for an UnimPanel

Hello,

You can try also this approach.

1. 

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  UnimPanel1.JSInterface.JSConfig('bodyCls', ['borderClass']);
end;

2. CustomCSS:

.borderClass {
  border-width: 4px !important;
  border-color: red !important;
}

 

  • Thanks 1
Link to comment
Share on other sites

Thanks a lot!

Because I need to set and delete the frame dynamically I use:

UnimPanel1.JSInterface.JSCall('addCls', ['borderClass']);

and

UnimPanel1.JSInterface.JSCall('removeCls', ['borderClass']);

instead of 

UnimPanel1.JSInterface.JSConfig('bodyCls', ['borderClass']);
Link to comment
Share on other sites

×
×
  • Create New...