Ario.Paxaz Posted December 29, 2025 Posted December 29, 2025 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. Quote
Ario.Paxaz Posted December 29, 2025 Author Posted December 29, 2025 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. Quote
Sherzod Posted December 29, 2025 Posted December 29, 2025 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. Quote
Ario.Paxaz Posted December 30, 2025 Author Posted December 30, 2025 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? Quote
Sherzod Posted December 30, 2025 Posted December 30, 2025 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 🙂 1 Quote
Ario.Paxaz Posted December 31, 2025 Author Posted December 31, 2025 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 😄 1 Quote
风吹小机机 Posted December 31, 2025 Posted December 31, 2025 This is what I did. The effect is as follows 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.