Cách xóa nút radio trong Visual Studio

2. thời gian chạy. Nó phức tạp hơn một chút so với phương pháp trên. Trong phương pháp này, bạn có thể tạo một RadioButton theo chương trình với sự trợ giúp của lớp RadioButton. Các bước sau đây cho thấy cách tạo một RadioButton động

  • Bước 1. Tạo nút radio bằng hàm tạo RadioButton[] được cung cấp bởi lớp RadioButton
// Creating radio button
RadioButton r1 = new RadioButton[];
  • Bước 2. Sau khi tạo RadioButton, thiết lập các thuộc tính của RadioButton do lớp RadioButton cung cấp
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
  • Bước 3. Và cuối cùng thêm điều khiển RadioButton này vào biểu mẫu bằng phương thức Add[]
// Add this radio button to the form
this.Controls.Add[r1];
  • Ví dụ

CSharp




// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
7

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
9

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
1

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
0

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
2

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
4

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
8

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
6
// Add this radio button to the form
this.Controls.Add[r1];
0

 

// Add this radio button to the form
this.Controls.Add[r1];
1
// Add this radio button to the form
this.Controls.Add[r1];
2

 

// Add this radio button to the form
this.Controls.Add[r1];
3
// Add this radio button to the form
this.Controls.Add[r1];
4
// Add this radio button to the form
this.Controls.Add[r1];
5
// Add this radio button to the form
this.Controls.Add[r1];
6

 

// Add this radio button to the form
this.Controls.Add[r1];
7____23
// Add this radio button to the form
this.Controls.Add[r1];
9

// Add this radio button to the form
this.Controls.Add[r1];
7____461

_______462____463

// Add this radio button to the form
this.Controls.Add[r1];
7____465

 

// Add this radio button to the form
this.Controls.Add[r1];
7__
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
67
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
68
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
69
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
70
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
71

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
72
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
73

// Add this radio button to the form
this.Controls.Add[r1];
7____461

// Add this radio button to the form
this.Controls.Add[r1];
7____465

 

// Add this radio button to the form
this.Controls.Add[r1];
7______467
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
68
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
61
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
70
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
63

// Add this radio button to the form
this.Controls.Add[r1];
7____461

_______462____467

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62______469____490
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
91

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____493____494
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
95

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____497______490
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
99

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____461____462
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
95

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62______465
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
90
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
67
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
68
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
69

 

_______462____511

_______462____513____514

 

_______462____516

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____518

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____460____490
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62

_______462____464____494

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
95

_______462____468____469

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
95

________ 462 ________ 102 ________ 490 ________ 104

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62______106
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
90
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
67
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
68
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
69

 

_______462____511

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____513____115

 

_______462____516

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____518

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____121____490
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____125____494
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
95

_______462____129____130

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
95

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
33
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
90
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
35

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62______137
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
90
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
67
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
68
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
69

_______462____511

_______462____513____146

 

_______462____516

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____518

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62______152____490
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____156____494
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
95

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____160____161
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
95

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62______164____490
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
66

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62______168
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
90
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
67
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
68
// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
69

 

_______462____511

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
62____513____177

// Add this radio button to the form
this.Controls.Add[r1];
7____465

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
65

// Set the AutoSize property 
r1.AutoSize = true;

// Add text in RadioButton
r1.Text = "Intern";

// Set the location of the RadioButton
r1.Location = new Point[286, 40];

// Set Font property 
r1.Font = new Font["Berlin Sans FB", 12];
65

  • đầu ra.  

 

Thuộc tính quan trọng

radiobutton-table { border-collapse. sự sụp đổ; . 100%; . radiobutton-table td { đường viền. 1px cố định #5fb962; . trái. quan trọng; . 8px; . radiobutton-table thứ { đường viền. 1px cố định #5fb962; . 8px; . radiobutton-table tr>th{ màu nền. #c6ebd9; . tên đệm; . radiobutton-bảng tr. con thứ n[lẻ] { màu nền. #ffffff;

Chúng ta có thể bỏ chọn nút radio không?

Để đặt nút radio thành chọn/bỏ chọn, chọn phần tử và đặt thuộc tính đã chọn của nó thành true hoặc false , e. g. ra-di-o của tôi. đã kiểm tra = đúng. Khi được đặt thành true , nút radio sẽ được chọn và tất cả các nút radio khác có cùng thuộc tính tên sẽ không được chọn.

Làm cách nào để xóa các nút radio trong Java?

Nếu bạn muốn xóa văn bản của JRadioButton có tên radio , bạn sẽ gọi radio. setText[""]. Nếu bạn muốn bỏ chọn nút này, bạn gọi radio. setSelected[false] .

Làm cách nào để xóa lựa chọn nút radio mat trong góc?

sắp xếp gửi. emit[cái này. value = ''] hoàn thành xóa lựa chọn đang hiển thị trong khu vực nhãn bộ lọc.

Nút radio trong Visual Studio là gì?

RadioButton được dùng để chọn một tùy chọn trong số các lựa chọn . Nếu chúng tôi chỉ muốn chọn một mục từ một nhóm mục có liên quan hoặc có liên quan trong biểu mẫu cửa sổ, chúng tôi có thể sử dụng nút radio. RadioButton loại trừ lẫn nhau chỉ đại diện cho một mục đang hoạt động và phần còn lại không được chọn trong biểu mẫu.

Chủ Đề