【问题标题】:What's the right way to append a ToolButton to a Toolbar in Gtk?将 ToolButton 附加到 Gtk 中的工具栏的正确方法是什么?
【发布时间】:2009-12-30 21:32:35
【问题描述】:

Monodoc 告诉我“AppendItem”已被弃用,但它没有告诉我改用什么。

【问题讨论】:

    标签: c# mono gtk toolbar gtk#


    【解决方案1】:

    请参阅Gtk+ 文档。你有可用的“插入”功能吗?

    编辑:从 jpobst 添加代码示例

    myToolBar.Insert (myToolItem, myToolBar.NItems);
    

    【讨论】:

    • 是的,我意识到您使用的是 C#,并且我指出了 C 文档
    • 我确实有可用的插入功能,但我宁愿只附加按钮,这样我就不用担心索引了。
    • myToolBar.Insert (myToolItem, myToolBar.NItems);
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-07
    • 1970-01-01
    • 1970-01-01
    • 2016-05-01
    相关资源
    最近更新 更多