【问题标题】:Set Font on GTK# Widget在 GTK# 小部件上设置字体
【发布时间】:2012-12-20 15:05:34
【问题描述】:

我想通过更改字体类型来更改按钮或菜单条目的样式。如何做到这一点,因为 GTK# 小部件上没有类似“Gtk.Button.Font”的属性

【问题讨论】:

    标签: mono monodevelop gtk#


    【解决方案1】:

    使用ModifyFont 方法。根据链接页面上的示例:

    button1.ModifyFont(FontDescription.FromString("Courier 16"));
    

    【讨论】:

      【解决方案2】:

      在我的情况下,button1.Child.ModifyFont 代替了button1.ModifyFont

      【讨论】:

        猜你喜欢
        • 2017-04-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-12-03
        • 2020-04-29
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多