IButtonControl

IButtonControl

System. Windows .Forms (system. windows .forms.dll) interface

This interface is implemented by Control objects such as Button and LinkLabel , which provide button-like behavior.

The framework requires the PerformClick() method to provide a way of programmatically clicking the button.

NotifyDefault() is called by the framework when the button becomes the default (i.e., when it is set as the active Form object's AcceptButton ).

Finally, DialogResult is the property you should implement to maintain the result code that will be set if the button is clicked to terminate a Form that has been shown modally with the ShowDialog() method.

 public interface  IButtonControl  {  // Public Instance Properties  public DialogResult  DialogResult  {set; get; }  // Public Instance Methods  public void  NotifyDefault  (bool  value  );    public void  PerformClick  (); } 

Implemented By

Button , LinkLabel

Returned By

Form.{AcceptButton , CancelButton} , PrintPreviewDialog.{AcceptButton , CancelButton}

Passed To

Form.{AcceptButton , CancelButton} , PrintPreviewDialog.{AcceptButton , CancelButton}



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net