CheckBox.cs 683 B

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