【发布时间】:2015-04-14 14:52:15
【问题描述】:
我正在使用 Tint2 创建桌面应用程序。我想使用本机工具栏功能,当我将ToolbarItem (docs) 添加到工具栏时,它根本不显示:
var toolbar = new Toolbar();
var new_button = new ToolbarItem();
new_button.title = 'Hello';
new_button.enabled = true;
toolbar.appendChild(new_button);
win.toolbar = toolbar;
同样,我尝试只使用Button (docs) 而不是ToolbarItem(文档中推荐使用后者)。这会产生一个非常小的按钮 - width 属性被忽略:
var toolbar = new Toolbar();
var new_button = new Button();
new_button.title = 'Hello';
new_button.width = '150px';
toolbar.appendChild(new_button);
win.toolbar = toolbar;
【问题讨论】:
标签: node.js desktop-application toolbar