Habanero.Faces.Win.ControlCollectionWin.Add C# (CSharp) Method

Add() public method

Adds a control to the collection
public Add ( IControlHabanero value ) : void
value IControlHabanero The control to add
return void
        public void Add(IControlHabanero value)
        {
            _col.Add(value.GetControl());
        }

Usage Example

 public void TestAddControl()
 {
     TextBoxWin tb = (TextBoxWin)GetControlFactory().CreateTextBox();
     IControlCollection col = new ControlCollectionWin(new System.Windows.Forms.Control.ControlCollection(tb));
     IControlHabanero ctl = GetControlFactory().CreateControl();
     col.Add(ctl);
     Assert.AreSame(ctl, col[0], "Control added should be the same object.");
 }