Re: Is it possible to display the toolbox categories in two columns?

100 views
Skip to first unread message
Message has been deleted

Abby Schmiedt

unread,
Mar 24, 2021, 12:56:44 AM3/24/21
to Blockly
Hello!

Just to clarify, do you always want two columns of categories? Or when the screen grows to a small enough size, do you want it to wrap the contents resulting in a toolbox with two columns? 

Cheers, 
Abby
On Monday, March 22, 2021 at 11:47:30 PM UTC-7 adt.t....@gmail.com wrote:
Hello.
I'm using blockly-vue and I'm in trouble.

Like
Is it possible to apply css to toolbox and display two columns of categories?

For blocklyToolboxContents, blocklyTreeRow, etc.
Specifying display: flex; flex-wrap: wrap; did not take effect.


Message has been deleted

Abby Schmiedt

unread,
Mar 24, 2021, 5:36:02 PM3/24/21
to Blockly
Hello!

So I don't know a way to do this with purely CSS. I was curious how difficult this would be to do by overriding the toolbox, so I created this example. I tried to comment the places that I had to change to make this work. It gives you the following structure: 

<div class="blocklyToolboxContents">
    <div class="column">
        <div class="toolboxCategory"></div>
    </div>
    <div class="column">
        <div class="toolboxCategory"></div>
    </div>
</div>

It breaks navigating the toolbox using the keyboard though. I would look into overriding onKeyDown_ to fix this behavior.

Let me know if you have any questions. 

Cheers, 
Abby 


On Tuesday, March 23, 2021 at 10:04:38 PM UTC-7 adt.t....@gmail.com wrote:
Hello Abby

I always want the categories to be displayed in two columns.

2021年3月24日水曜日 13:56:44 UTC+9 Abby Schmiedt:
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages