CheckBox.cs 622 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // System.Windows.Forms.CheckBox
  3. //
  4. // Author:
  5. // Joel Basson ([email protected])
  6. //
  7. //
  8. using System.Drawing;
  9. namespace System.Windows.Forms {
  10. /// <summary>
  11. /// Represents a Windows CheckBox control.
  12. ///
  13. /// </summary>
  14. public class CheckBox: ButtonBase{
  15. public CheckBox () : base ()
  16. {
  17. }
  18. internal override Gtk.Widget CreateWidget () {
  19. Gtk.CheckButton cbox = new Gtk.CheckButton();
  20. cbox.Add (label.Widget);
  21. return cbox;
  22. }
  23. public bool Checked {
  24. get {
  25. return ((Gtk.CheckButton)Widget).Active;
  26. }
  27. set {
  28. ((Gtk.CheckButton)Widget).Active = value;
  29. }
  30. }
  31. }
  32. }