本文整理汇总了C#中Gtk.Button.RenderIcon方法的典型用法代码示例。如果您正苦于以下问题:C# Button.RenderIcon方法的具体用法?C# Button.RenderIcon怎么用?C# Button.RenderIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Button
的用法示例。
在下文中一共展示了Button.RenderIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: create_button_stock_image
public static Button create_button_stock_image(String stockid,String tooltip){
Button tb = new Button(stockid);
tb.Remove(tb.Child);
VBox v = new VBox();
v.Add(new Gtk.Image(tb.RenderIcon(stockid,IconSize.SmallToolbar,tooltip)));
tb.Add(v);
tb.WidthRequest = 30;
tb.CanFocus = false;
tb.TooltipText = tooltip;
tb.HasTooltip = true;
return tb;
}
示例2: BuildIcons
// Inserts the icons
private void BuildIcons()
{
_iconlistOptions.IconSelected += OnIconSelectedProject;
//_iconlistOptions.IconUnselected += OnIconUnselectedProject; //Crashes with debian-based-systems and mono >= 1.1.5
_iconlistOptions.KeyPressEvent += OnKeyPressEvent;
Gtk.Button button = new Gtk.Button ();
Gdk.Pixbuf pbuf = button.RenderIcon (Gtk.Stock.New, Gtk.IconSize.LargeToolbar, Gtk.Stock.New);
_iconlistOptions.AppendPixbuf(pbuf , _icon_list[0,0], _icon_list[0,1]);
pbuf = button.RenderIcon (Gtk.Stock.Open, Gtk.IconSize.LargeToolbar, Gtk.Stock.Open);
_iconlistOptions.AppendPixbuf(pbuf , _icon_list[1,0], _icon_list[1,1]);
pbuf = button.RenderIcon (Gtk.Stock.Convert, Gtk.IconSize.LargeToolbar, Gtk.Stock.Convert);
_iconlistOptions.AppendPixbuf(pbuf , _icon_list[2,0], _icon_list[2,1]);
_iconlistOptions.AppendPixbuf(pbuf , _icon_list[3,0], _icon_list[3,1]);
//_iconlistOptions.SelectIcon (0); //Crashes with debian-based-systems and mono >= 1.1.5
_selection = ProjectDialogAction.None;
}