admin管理员组

文章数量:1336080

I am developing a VSCode plugin and want to display a webview content in the bottom panel (the one where the terminal is located), but I have reviewed VSCode's API and there is no item in the ViewColumn enumeration that can control the display in the bottom panel. Does anyone know how to display it in that position? Thank you very much.

enter image description here enter image description here I ask AI,he told me to set ViewColumn.Panel,but there is not this item.

I am developing a VSCode plugin and want to display a webview content in the bottom panel (the one where the terminal is located), but I have reviewed VSCode's API and there is no item in the ViewColumn enumeration that can control the display in the bottom panel. Does anyone know how to display it in that position? Thank you very much.

enter image description here enter image description here I ask AI,he told me to set ViewColumn.Panel,but there is not this item.

Share Improve this question asked Nov 21, 2024 at 2:46 李致知李致知 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

You have to contribute your viewContainer to panel, instead of activityBar, like the example below:

    "contributes": {
        "viewsContainers": {
            "panel": [
                {
                    "id": "project-manager",
                    "title": "%projectManager.activitybar.title%",
                    "icon": "images/project-manager-side-bar.svg"
                }
            ]
        },
        "views": {
            "project-manager": [
                {
                    "id": "projectsExplorerFavorites",
                    "name": "%projectManager.views.favorites.name%"
                },

The documentation here (https://code.visualstudio/api/references/contribution-points#contributes.viewsContainers) defines this behavior:

At present, you can contribute them to the Activity Bar (activitybar) and Panel (panel).

本文标签: visual studio codeHow to place a VSCode plugin39s webview in the bottom panelStack Overflow