本文整理汇总了C#中ScintillaNET.Scintilla.SetBounds方法的典型用法代码示例。如果您正苦于以下问题:C# Scintilla.SetBounds方法的具体用法?C# Scintilla.SetBounds怎么用?C# Scintilla.SetBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScintillaNET.Scintilla
的用法示例。
在下文中一共展示了Scintilla.SetBounds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InfoPanel
public InfoPanel() {
content = new Scintilla();
ScintillaHack.Apply(content);
content.BorderStyle = BorderStyle.None;
content.Folding.IsEnabled = false;
foreach (var i in content.Margins)
i.Width = 0;
content.BackColor = BackColor = Color.FromArgb(0xff, 0xff, 0xe1);
content.Styles[1].Font = Font; // Header
content.Styles[1].Size = 10;
content.Styles[1].BackColor = BackColor;
content.Styles[1].ForeColor = Color.FromArgb(0x00, 0x00, 0x00);
content.Styles[2].Font = Font; // Name
content.Styles[2].Size = 9;
content.Styles[2].BackColor = BackColor;
content.Styles[2].ForeColor = Color.FromArgb(0x00, 0x00, 0x00);
content.Styles[2].Bold = true;
content.Styles[3].Font = Font; // Value
content.Styles[3].Size = 9;
content.Styles[3].BackColor = BackColor;
content.Styles[3].ForeColor = Color.FromArgb(0x00, 0x00, 0x00);
content.Scrolling.HorizontalScrollTracking = true;
content.Selection.BackColorUnfocused = content.Selection.BackColor;
content.Selection.ForeColorUnfocused = content.Selection.ForeColor;
const uint SCI_SETEXTRAASCENT = 2525;
const uint SCI_SETEXTRADESCENT = 2527;
content.NativeInterface.SendMessageDirect(SCI_SETEXTRAASCENT, 2);
content.NativeInterface.SendMessageDirect(SCI_SETEXTRADESCENT, 3);
content.IsReadOnly = true;
Controls.Add(content);
Width = Height = 100;
content.SetBounds(0, 0, Width, Height);
content.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
}