How to create a custom dialog in vscode?

我们两清 提交于 2019-12-03 13:00:19
Llewey

You cannot create new UI elements, but if you want to get inputs from the user you can use code like below:

let options: InputBoxOptions = {
    prompt: "Label: ",
    placeHolder: "(placeholder)"
}

window.showInputBox(options).then(value => {
    if (!value) return;
    answer1 = value;
    // show the next dialog, etc.
});

This will use the same UI as the command palette (when you press Ctrl+P, or any of the other commands that open the input box at the top).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!