Make Warning text appear

24 views
Skip to first unread message

Alan Smith

unread,
Aug 4, 2025, 11:47:38 AMAug 4
to blo...@googlegroups.com
In Blockly, I can set a warning on a block with setWarningText but it shows the warning icon and the user has to click on it to see why the warning is there.   Is there a way to automatically display the warning text to the user?

Thanks in advance,

Alan

Aaron Dodson

unread,
Aug 4, 2025, 12:31:40 PMAug 4
to Blockly
Hi Alan,

Sure! After you set the warning text, call block.getIcon(Blockly.icons.IconType.WARNING).setBubbleVisible(true);

- Aaron

Alan Smith

unread,
Aug 4, 2025, 1:13:28 PMAug 4
to blo...@googlegroups.com
Thanks!!!!

--Alan


--
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 visit https://groups.google.com/d/msgid/blockly/98c2d0f4-9f50-44f3-a894-a30406968d81n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages