Jump to content

How to remove border for Panel Title on focus/active


JamesP

Recommended Posts

Hello,

Could you please advise how to remove border for Panel Title? The border appears when Panel Title is focused (when I clicked on it).

image.png.1873cde755c743caaa70634b5acdec86.png

 

Without clicking on title it shows OK.

image.png.f08c9037501a00e6caaa623f520ab060.png

 

Thank you in advance

 

 

Link to comment
Share on other sites

Hi Sherzod,

15 hours ago, Sherzod said:

Hello, 

This post may help you:

 

Thank you for looking at it.

I have looked at post you suggested, but everybody said in that post that it's not resolved the issue panel title still had a border/focus border around the title.

I have tried it by myself and it did not work for me:

TMainForm.UniFormCreate(Sender: TObject); beginUniPanel1.JSInterface.JSConfigObject('header', 'focusCls', ['']); end;  

You have mention that you didn't understand my case, let me please to explain what I try to achieve here:

I have got a frame which has "accordion" layout where in runtime 3 panels are created with titles: "Applications", "Maintenance" and "System". those panels have "background: SlateGray;" and "accordion" layout as well and they have children panels with "background: LightBlue;". If you look at screens I have provided earlier or below, it's expanded Panel "Maintenance" and inside panel with title "Panel Title" (obviously. I called it "Panel Title" only to provide those screens). You can see the panel with title  "Panel Title" has a border around title as I clicked on panel title. If I click somewhere inside this panel the border disappears. Also the border doesn't appear if I expand/collapse panels by using "+" / "-", it only happens when I click on panel title.

if we look at the uniGUI demo Layout Management -> Accordion Layout we won't see that kind of border as themes have the same colour for background colour and border around panel title text (I mean title label/caption)

image.png.e142abdfbe514cd610b62ed25bd8eaad.png

The same happens for Parent panels as well

image.png.054422dd22dd894161ea4e00088f4055.png

Also, I have tried your suggestion for panel created in design time as well and it didn't work either.

I have changed the background colour for whole title using CSS, but couldn't manage to change border colour around Title text.

Could you please help me out this that as it looks awkward?

Kind Regards

 

Link to comment
Share on other sites

5 hours ago, JamesP said:

I have tried it by myself and it did not work for me

Okay, also try this approach, OnReady event:

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  UniPanel1.JSInterface.JSAssign('header.titleCmp.focusCls', ['']);
end;

 

Link to comment
Share on other sites

1 hour ago, Sherzod said:

Okay, also try this approach, OnReady event:

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  UniPanel1.JSInterface.JSAssign('header.titleCmp.focusCls', ['']);
end;

 

I have just tried your solutions and it worked as I needed for panel that has been created at design time and for panels that are created at runtime.

It's perfect. Thank you very much for your help.

Kind Regards

 

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...