ui.Map.insert
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แทรกวิดเจ็ตลงในแผงที่ดัชนีที่ระบุ
แสดงแผงนี้
การใช้งาน | การคืนสินค้า |
---|
Map.insert(index, widget) | ui.Panel |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ ui.panel | ui.Panel | อินสแตนซ์ ui.Panel |
index | ตัวเลข | ดัชนีที่จะแทรกวิดเจ็ต |
widget | ui.Widget | วิดเจ็ตที่จะแทรก |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe \u003ccode\u003einsert\u003c/code\u003e function adds a ui.Widget to a ui.Panel at a designated index.\u003c/p\u003e\n"],["\u003cp\u003eThis function returns the modified ui.Panel, allowing for method chaining.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003einsert\u003c/code\u003e takes the ui.Panel, the insertion index, and the ui.Widget as arguments.\u003c/p\u003e\n"]]],["The `insert` method of a `ui.Panel` allows adding a `ui.Widget` at a specific index within the panel. It requires the panel instance (`this: ui.panel`), the desired `index` (a number), and the `widget` to be inserted. The method's core action is inserting the provided widget at the designated location. It returns the same `ui.Panel` instance after the insertion.\n"],null,["# ui.Map.insert\n\n\u003cbr /\u003e\n\nInserts a widget into to the panel at the specified index.\n\n\u003cbr /\u003e\n\nReturns this panel.\n\n| Usage | Returns |\n|-----------------------------|----------|\n| Map.insert`(index, widget)` | ui.Panel |\n\n| Argument | Type | Details |\n|------------------|-----------|------------------------------------------|\n| this: `ui.panel` | ui.Panel | The ui.Panel instance. |\n| `index` | Number | The index at which to insert the widget. |\n| `widget` | ui.Widget | The widget to insert. |"]]