我如何为我的ActivityBar ViewContainer添加一个数字气泡
我正在使用ActivityBar ViewContainer添加特定于扩展程序的侧边栏图标。当您单击侧边栏中的图标时,它将打开一个显示列表的视图。该列表可以随时更新。我希望图标具有一个数字,该数字显示列表中有多少个项目,就像源控件扩展程序和文件explorer一样,当文件未保存时。
I'm using the activitybar viewContainer to add a sidebar icon specific to my extension. When you click the icon in the sidebar it opens a view that reveals a list. The list can be updated anytime. I would like the icon to have a number which shows how many items are in the list, exactly like the source control extension and the file explorer when files are unsaved.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来这将在v1.72中发布(现在是内部构建中的 - 演示来自内部人员的构建)。
viewContainers
上的徽章的API非常简单:这就是
viewBadge
is:因此,此代码有效:
然后您可以更新
this.tabview.badge.badge.badge.badge
使用新的value
在您想要的时候(似乎每次更新值时都必须保留工具提示)。在这里,它正在处理我写的扩展名:
It looks like this will be released in v1.72 (it is in the Insiders Build now - the demo is from the Insiders Build).
The api for badges on
ViewContainers
is quite simple:and here is what a
ViewBadge
is:So this code works:
and then you can update
this.tabView.badge
with a newvalue
whenever you want (it seems you have to keep including the tooltip each time you update the value though).Here it is working on an extension I wrote: