ui.root.remove
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Xoá tiện ích đã cho khỏi bảng điều khiển gốc, nếu có.
Trả về tiện ích đã xoá hoặc giá trị rỗng nếu tiện ích không có trong bảng điều khiển gốc.
Cách sử dụng | Giá trị trả về |
---|
ui.root.remove(widget) | Đối tượng |
Đối số | Loại | Thông tin chi tiết |
---|
widget | ui.Widget | Tiện ích cần xoá. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eRemoves the specified widget from the UI's root panel.\u003c/p\u003e\n"],["\u003cp\u003eReturns the removed widget, or null if it wasn't found.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003eui.root.remove(widget)\u003c/code\u003e function where \u003ccode\u003ewidget\u003c/code\u003e is the target ui.Widget.\u003c/p\u003e\n"]]],["The `ui.root.remove(widget)` function removes a specified widget from the root panel. It accepts a single argument, `widget`, of type `ui.Widget`, which represents the widget to be removed. The function returns the removed widget if it was present in the root panel; otherwise, it returns `null`. The return type of this function is Object.\n"],null,["# ui.root.remove\n\n\u003cbr /\u003e\n\nRemoves the given widget from the root panel, if it exists.\n\n\u003cbr /\u003e\n\nReturns the removed widget or null if the widget was not present in the root panel.\n\n| Usage | Returns |\n|--------------------------|---------|\n| `ui.root.remove(widget)` | Object |\n\n| Argument | Type | Details |\n|----------|-----------|-----------------------|\n| `widget` | ui.Widget | The widget to remove. |"]]