addColourBorder_ on nested categories

50 views
Skip to first unread message

Joshua Lowe

unread,
Jun 10, 2025, 8:18:41 AM6/10/25
to Blockly
Hi all,

I'm following this guide and it works for regular categories however my custom addColourBorder_ function does not apply to top level categories when there are nested categories within it.

Is there a workaround?



epas...@google.com

unread,
Jun 10, 2025, 3:22:58 PM6/10/25
to Blockly
Hi there,

Collapsible categories are registered under a separate name since they often need to be styled differently to show they are collapsible. If you repeat the steps in the guide but make a new custom category that extends CollapsibleToolbox and registers using Blockly.CollapsibleToolboxCategory.registrationName instead of Blockly.ToolboxCategory.registrationName it should get applied to the collapsible menus.

Cheers,
Erik

Joshua Lowe

unread,
Jun 11, 2025, 5:32:37 AM6/11/25
to Blockly
Thanks Erik! This fixed my issue
Reply all
Reply to author
Forward
0 new messages