forked from DebugST/STTextBox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrmSingleView.cs
More file actions
49 lines (43 loc) · 1.42 KB
/
FrmSingleView.cs
File metadata and controls
49 lines (43 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ST.Library.UI.STTextBox;
namespace STTextBoxTest.Demos
{
public partial class FrmSingleView : Form
{
public FrmSingleView() {
InitializeComponent();
}
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
STTextBox tbx_single = new STTextBox();
tbx_single.SetTextView(new SingleTextView());
tbx_single.Dock = DockStyle.Top;
tbx_single.Height = 30;
tbx_single.AllowScrollBar = false;
tbx_single.SetText("this is a single text box");
STTextBox tbx_code = new STTextBox();
tbx_code.SetTextStyleMonitors(new CSharpStyleMonitor());
tbx_code.Dock = DockStyle.Fill;
tbx_code.Font = new System.Drawing.Font("Consolas", 10);
this.Controls.Add(tbx_code);
this.Controls.Add(tbx_single);
string strCode = @"
//this is code
STTextBox tbx_single = new STTextBox();
tbx_single.SetTextView(new SingleTextView());
tbx_single.Dock = DockStyle.Top;
tbx_single.Height = 30;
tbx_single.AllowScrollBar = false;
tbx_single.SetText(""this is a single text box"");
this.Controls.Add(tbx_single);";
tbx_code.SetText(strCode.Trim());
}
}
}