本文整理汇总了C#中Gtk.ComboBox.ModifyFont方法的典型用法代码示例。如果您正苦于以下问题:C# ComboBox.ModifyFont方法的具体用法?C# ComboBox.ModifyFont怎么用?C# ComboBox.ModifyFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.ComboBox
的用法示例。
在下文中一共展示了ComboBox.ModifyFont方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateComboBoxSigning
private void GenerateComboBoxSigning(ref Table table, string name, string label, string selectVal,int xPos,List<SettingValue> list)
{
xPos = xPos+3;
Label lblApp = new Label(label);
lblApp.Xalign = 1;
lblApp.Yalign = 0.5F;
lblApp.WidthRequest = 115;
if(table.Name != "table1")
lblApp.WidthRequest = 114;
CellRendererText textRenderer = new CellRendererText();
ComboBox cbe = new ComboBox();//(val);
ListStore cbModel = new ListStore(typeof(string), typeof(string));
cbe.PackStart(textRenderer, true);
cbe.AddAttribute(textRenderer, "text", 0);
cbe.Name = name;
cbe.Model= cbModel;
cbe.Active = 0;
if(MainClass.Platform.IsMac){
TreeIter ti = new TreeIter();
foreach(SettingValue ds in list){// MainClass.Settings.InstallLocations){
if(ds.Value == selectVal){
ti = cbModel.AppendValues(ds.Display,ds.Value);
cbe.SetActiveIter(ti);
} else cbModel.AppendValues(ds.Display,ds.Value);
}
if(cbe.Active <0)
cbe.Active =0;
} else {
cbe.Sensitive = false;
if(!String.IsNullOrEmpty(selectVal)){
cbModel.AppendValues(selectVal,selectVal);
cbe.Active =0;
} else {
Pango.FontDescription customFont = Pango.FontDescription.FromString(MainClass.Settings.ConsoleTaskFont);
customFont.Weight = Pango.Weight.Bold;
cbe.ModifyFont(customFont);
cbModel.AppendValues("Please, don´t forget set the provisioning","");
cbe.Active =0;
}
}
table.Attach(lblApp,0,1,(uint)(xPos-1),(uint)xPos,AttachOptions.Fill,AttachOptions.Shrink,0,0);
table.Attach(cbe,1,2,(uint)(xPos-1),(uint)xPos,AttachOptions.Expand|AttachOptions.Fill,AttachOptions.Expand,0,0);
}