RadioButton control is a control which is used for selecting one of the mutually exclusive options. The radio buttons are usually used in a group which acts as a single control and only one radio button can be selected at a time. The radio button label can be set by using the Text property. You can get or set the selected state of the control by setting the Checked property. Similar to other Input controls, RadioButton also provides Trimming property which lets you specify how to handle the text that does not fit in the available space. Apart from this, the control also lets you set alignment of the check and the button label by setting the CheckAlign and TextAlign properties.
PictureBoxコントロールの作成 |
コードのコピー
|
---|---|
radbtn1 = new C1RadioButton(); radbtn2 = new C1RadioButton(); Controls.Add(radbtn1); Controls.Add(radbtn2); radbtn1.Location = new Point(10, 300); radbtn2.Location = new Point(126, 300); radbtn1.Text = "Male"; radbtn2.Text = "Female"; radbtn1.Size = new Size(120, 100); radbtn2.Size = new Size(120, 100); radbtn2.Trimming = StringTrimming.EllipsisCharacter; |