แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
กล่องเครื่องมือ
กล่องเครื่องมือประกอบด้วยบล็อกต่างๆ ที่คุณใช้เขียนโปรแกรม คุณสามารถลากบล็อกลงในพื้นที่ทํางานได้
ดูข้อมูลเพิ่มเติมเกี่ยวกับลักษณะของกล่องเครื่องมือได้ที่อภิธานศัพท์ภาพ
คำจำกัดความพื้นฐาน
คําจํากัดความของกล่องเครื่องมือจะระบุบล็อกที่จะรวมไว้ในกล่องเครื่องมือและลําดับของบล็อก ลักษณะและสไตล์ส่วนใหญ่ของกล่องเครื่องมือจะระบุด้วยวิธีอื่นๆ
เราขอแนะนำให้กำหนดกล่องเครื่องมือโดยใช้ JSON
ข้อมูลโค้ดนี้กำหนดกล่องเครื่องมือ Flyout ที่มี 2 บล็อก
const toolbox = {
// There are two kinds of toolboxes. The simpler one is a flyout toolbox.
kind: 'flyoutToolbox',
// The contents is the blocks and other items that exist in your toolbox.
contents: [
{
kind: 'block',
type: 'controls_if'
},
{
kind: 'block',
type: 'controls_whileUntil'
}
// You can add more blocks to this array.
]
};
// The toolbox gets passed to the configuration struct during injection.
const workspace = Blockly.inject('blocklyDiv', {toolbox: toolbox});

ดูข้อมูลเพิ่มเติมเกี่ยวกับวิธีกำหนดค่าและกำหนดค่ากล่องเครื่องมือได้ที่หัวข้อภาพรวมกล่องเครื่องมือ
ดูข้อมูลเพิ่มเติมเกี่ยวกับการแทรกได้ที่การสร้างพื้นที่ทำงาน
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-04 UTC
[null,null,["อัปเดตล่าสุด 2024-11-04 UTC"],[[["The Blockly toolbox houses programming blocks that users can drag onto the workspace to build programs."],["Toolboxes are typically defined using JSON to specify which blocks are included and their arrangement."],["The provided code snippet demonstrates creating a basic flyout toolbox containing 'controls_if' and 'controls_whileUntil' blocks."],["Further information regarding toolbox configuration and workspace injection can be found in the linked resources."]]],["The toolbox, containing program blocks, is defined using JSON and can be dragged onto the workspace. A flyout toolbox, a simpler type, is specified by its `kind` and `contents`. The `contents` array lists blocks, defined by their `kind` and `type`, such as `controls_if` and `controls_whileUntil`. This toolbox definition is then passed to the configuration during the workspace injection process using `Blockly.inject`.\n"]]