日期:2010-01-05  浏览次数:20498 次

  1. using System; 
  2. using System.Windows.Forms; 
  3. using System.Drawing; 
  4. using System.ComponentModel; 
  5.  
  6. namespace WindowsApplication4 
  7.     /// <summary> 
  8.     /// Summary description for CustomColorRadioButton. 
  9.     /// </summary> 
  10.     public class CustomColorRadioButton : RadioButton 
  11.     { 
  12.         // Fields 
  13.         private Color checkColor; 
  14.  
  15.         public CustomColorRadioButton() 
  16.         { 
  17.             this.checkColor = this.ForeColor; 
  18.             this.Paint += new PaintEventHandler(this.PaintHandler); 
  19.         } 
  20.  
  21.         [Description("The color used to display the check painted in the RadioButton")] 
  22.         public Color CheckColor  
  23.         { 
  24.             get  
  25.             { 
  26.                 return checkColor; 
  27.             } 
  28.             set  
  29.             { 
  30.                &nbs