Dropdown icon + text

1,137 views
Skip to first unread message

Jonty Small

unread,
Mar 18, 2022, 10:47:43 AM3/18/22
to Blockly
Hi all,

I was thinking of including icons alongside text in the dropdown boxes and was wondering if it's possible?

The idea is something like:
icontext.PNG
but with images instead of emojis.

One possible solution that may be the way we have to go is having each dropdown option be an image and the image includes the text in itself. There are a few drawbacks to this approach though.

For those wondering with emojis this is done the same way you'd write emojis (if you use windows: windows key+. pulls up the emoji keyboard) so in the array for the options its
["🚕🚕🚕cars", 'option0'],
['🚌🚌🚌 Buses', ' option 1'],
['🛴🛴🛴 Scooters', ' option 2'],


Best,
Jonty

Beka Westberg

unread,
Mar 18, 2022, 4:48:25 PM3/18/22
to blo...@googlegroups.com
Hello,

Currently you can include image options, and you can include text options, but you can't include options that have both images and text :/ See the dropdown field documentation.

Feel free to send in a feature request for this though! It would be super cool to have :D

Best wishes,
--Beka

--
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/ac4aa76d-c8a9-4beb-ac30-55d3060787cdn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages