-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathToolTip.cs
More file actions
37 lines (30 loc) · 1020 Bytes
/
ToolTip.cs
File metadata and controls
37 lines (30 loc) · 1020 Bytes
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
using System;
using System.Windows.Forms;
namespace Examples {
class MainForm : Form {
public static void Main() {
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
public MainForm() {
Text = "ToolTip example";
button.Parent = this;
button.Text = "button";
button.Location = new System.Drawing.Point(10, 10);
checkBox.Parent = this;
checkBox.Text = "check";
checkBox.Location = new System.Drawing.Point(10, 40);
label.Parent = this;
label.Text = "label";
label.Location = new System.Drawing.Point(10, 70);
toolTip.ToolTipTitle = "ToolTip title";
toolTip.SetToolTip(button, "button toolTip...");
toolTip.SetToolTip(checkBox, "checkBox toolTip...");
toolTip.SetToolTip(label, "label toolTip...");
}
private Button button = new Button();
private CheckBox checkBox = new CheckBox();
private Label label = new Label();
private ToolTip toolTip = new ToolTip();
}
}