How to create a text block similar to math_numbers block

34 views
Skip to first unread message

lizzhh lizi

unread,
Jul 17, 2024, 12:35:24 PM (5 days ago) Jul 17
to Blockly
When I use text blocks as shadow blocks, I find that these blocks appear more bulky compared to math_numbers blocks. 
Pay attention to the part highlighted by the red box in the following image
text block:
Snipaste_2024-07-17_10-42-18.png
math_number block:
Snipaste_2024-07-17_10-42-25.png
I want to remove the outer yellow shadow and quotation marks, and make the field_input and field_numbers look similar
like this (block in scratch):
Snipaste_2024-07-17_10-45-55.png

Beka Westberg

unread,
Jul 18, 2024, 12:47:06 PM (4 days ago) Jul 18
to Blockly
Hello,

You can do this by defining a custom text block that only includes a text input field, and doesn't include the images. Then change places in your toolbox that reference the built-in blocks to reference your custom block.

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

Reply all
Reply to author
Forward
0 new messages