How to add label for the categories blocks in the blockly toolbox

344 views
Skip to first unread message

Naresh Chaudhari

unread,
Feb 15, 2021, 5:55:55 AM2/15/21
to Blockly
Hi, I'm new to Blockly and I want to add text labels inside the categories block at the top of the blocks where all blocks are displaying. say for ex: If we select the Logic category the blocks of that category are displaying on the left side. So at the top, I want to add the "Logic" label. How can I add? Can someone help me out by giving ideas or with code example. Help will be appreciated. 

Thank you

Naresh Chaudhari

unread,
Feb 15, 2021, 5:59:24 AM2/15/21
to Blockly
I have added a screenshot taken from scratch.mit.edu
Capture.PNG

Beka Westberg

unread,
Feb 15, 2021, 6:13:53 PM2/15/21
to blo...@googlegroups.com
Hello,

This actually has a really easy fix :D You just need to add some label nodes to your toolbox XML/JSON, as described here.

I hope that helps! If you have any further questions please reply!
--Beka

On Mon, Feb 15, 2021 at 2:55 AM Naresh Chaudhari <chaudhary...@gmail.com> wrote:
Hi, I'm new to Blockly and I want to add text labels inside the categories block at the top of the blocks where all blocks are displaying. say for ex: If we select the Logic category the blocks of that category are displaying on the left side. So at the top, I want to add the "Logic" label. How can I add? Can someone help me out by giving ideas or with code example. Help will be appreciated. 

Thank you

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/b56ea77c-bd98-4bf4-9629-d14fd75e0e59n%40googlegroups.com.

Naresh Chaudhari

unread,
Feb 15, 2021, 10:21:23 PM2/15/21
to Blockly
Thanks a lot... Beka. You made my work easy.

Beka Westberg

unread,
Feb 16, 2021, 6:08:32 PM2/16/21
to Blockly
Oh my pleasure! Best of luck with your project :D
Reply all
Reply to author
Forward
0 new messages