本文整理汇总了C#中TextView.ModifyFg方法的典型用法代码示例。如果您正苦于以下问题:C# TextView.ModifyFg方法的具体用法?C# TextView.ModifyFg怎么用?C# TextView.ModifyFg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextView
的用法示例。
在下文中一共展示了TextView.ModifyFg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SharpApp
public SharpApp()
: base("Windows")
{
SetDefaultSize(300,250);
SetPosition(WindowPosition.Center);
BorderWidth=15;
DeleteEvent += delegate{Application.Quit();};
Table table = new Table(8, 4, false);
table.ColumnSpacing = 3;
Label title = new Label("Windows");
Alignment halign = new Alignment(0,0,0,0);
halign.Add(title);
table.Attach(halign, 0,1,0,1, AttachOptions.Fill, AttachOptions.Fill, 0,0);
TextView wins = new TextView();
wins.ModifyFg(StateType.Normal, new Gdk.Color(20,20,20));
wins.CursorVisible = false;
table.Attach(wins, 0,2,1,3, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 1,1);
Button activate = new Button("Activate");
activate.SetSizeRequest(50,30);
table.Attach(activate,3,4,1,2,AttachOptions.Fill, AttachOptions.Shrink,1,1);
Alignment valign = new Alignment(0,0,0,0);
Button close = new Button("Close");
close.SetSizeRequest(70,30);
valign.Add(close);
table.SetRowSpacing(1,3);
table.Attach(valign,3,4,2,3,AttachOptions.Fill, AttachOptions.Fill | AttachOptions.Expand,1,1);
Alignment halign2 = new Alignment(0,1,0,0);
Button help = new Button("Help");
help.SetSizeRequest(70,30);
halign2.Add(help);
table.SetRowSpacing(3,6);
table.Attach(halign2, 0,1,4,5, AttachOptions.Fill, AttachOptions.Fill, 0,0);
Button ok = new Button("Ok");
ok.SetSizeRequest(70,30);
table.Attach(ok,3,4,4,5,AttachOptions.Fill, AttachOptions.Fill, 0,0);
Add(table);
ShowAll();
}