visual studio code - How to place a VSCode plugin's webview in the bottom panel - Stack Overflow

I am developing a VSCode plugin and want to display a webview content in the bottom panel (the one wher

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).

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742317253a4421086.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信