0

我有将外观设置为按钮的单选按钮。我添加了背景图片。现在点击效果不明显,因为背景有点在按钮的顶部而没有受到影响。

我认为最好使图像更小,以便更清楚地知道选择了哪个,但最好是整个单选按钮看起来自然按下7突出显示/任何效果。

谢谢

  this.radioButton3.Appearance = System.Windows.Forms.Appearance.Button;
  this.radioButton3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
  this.radioButton3.Location = new System.Drawing.Point(137, 111);
  this.radioButton3.Name = "radioButton3";
  this.radioButton3.Size = new System.Drawing.Size(80, 31);
  this.radioButton3.TabIndex = 2;
  this.radioButton3.TabStop = true;
  this.radioButton3.UseVisualStyleBackColor = true;
  this.radioButton3.CheckedChanged += new    
  System.EventHandler(this.radioButton1_CheckedChanged);

当点击我想要改变

      if (control is RadioButton) {
      RadioButton radio = control as RadioButton;
      if (radio.Checked) {

      }
    }
4

0 回答 0