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.
1 Answer
Reset to default 0You 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).