Jump to content

Recommended Posts

Posted

Hello

I want to change the color of the UniTabSheet caption with the following code, but it doesn't work.

procedure TMainForm.TabEnter(ATab: TUniTabSheet);
Begin
  ATab.JSInterface.JSCall('addCls', ['uni-tab-caption-active']);
end;

 

Regards.

Posted
15 minutes ago, Sherzod said:

This post may help you:

Thanks,It's worked.

But I want the color change to only be on the control that is active.
Look at the image below, the user's mouse is down, but both tabs are colored.

Screenshot2025-12-29175236.png.06ed512dc5138ecfd123becfcf914317.png

Posted

From a design perspective, this behavior is intentional. The color reflects the active control state, not just the mouse-down event.

Highlighting all tabs of the active PageControl helps maintain a clear visual context, even when multiple PageControls are present on the form.

Posted
On 12/29/2025 at 7:14 PM, Sherzod said:

this behavior is intentional

Thank you for the explanation.

I understand now that this behavior is intentional in UniGUI and that tab coloring reflects the active control (PageControl focus), not just the selected TabSheet.

In my case, however, this is a deliberate UX requirement coming from users:

they want a clearer indication of which specific TabSheet is currently active, especially when a PageControl already has focus.

I’m fine with going against the default UniGUI behavior and handling this manually.

From an UniGUI perspective, what would be the recommended or supported way to:

visually highlight only the active TabSheet, and

 is there a cleaner / more framework-aligned method you would suggest?

Posted
45 minutes ago, Ario.Paxaz said:

From an UniGUI perspective, what would be the recommended or supported way to:

visually highlight only the active TabSheet

I’ll try to analyze the situation — it might take a year 🙂

  • Happy 1
Posted
13 hours ago, Sherzod said:

it might take a year

🙂

Thanks, and wishing you a happy and productive new year!

It reminded me of a time when my computer once took a whole year to boot 😄

  • Happy 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...