src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/DropDownControl.cs
/// <summary>
///     Specify the control to display in the drop-down
/// </summary>
/// <param name="control">control to display</param>
Specify the control to display in the drop-down
Specify the control to display in the drop - down
public void SetComponent(Control control)
        {
            if (control == null)
            {
                throw new ArgumentNullException("control");
            }
            if (_dropDownHolder == null)
            {
                _dropDownHolder = new DropDownHolder(this);
                _dropDownHolder.Font = Font;
            }
            if (_dropDown != null)
            {
                _dropDown.KeyDown -= OnDropDownKeyDown;
                _dropDown.Dispose();
            }
            _dropDown = control;
            if (_dropDown != null)
            {
                control.Site = Site;
                control.KeyDown += OnDropDownKeyDown;
                _dropDownHolder.SetComponent(_dropDown, (_uiTypeEditor == null) ? Resizable : _uiTypeEditor.IsDropDownResizable);
            }
        }
public void SetComponent ( Control control ) { if ( control == null ) { throw new ArgumentNullException ( " " ) ; } if ( _dropDownHolder == null ) { _dropDownHolder = new DropDownHolder ( this ) ; _dropDownHolder . Font = Font ; } if ( _dropDown != null ) { _dropDown . KeyDown -= OnDropDownKeyDown ; _dropDown . Dispose ( ) ; } _dropDown = control ; if ( _dropDown != null ) { control . Site = Site ; control . KeyDown += OnDropDownKeyDown ; _dropDownHolder . SetComponent ( _dropDown , ( _uiTypeEditor == null ) ? Resizable : _uiTypeEditor . IsDropDownResizable ) ; } }
Specify the control to display in the drop-down
Specify the control to display in the drop - down
// create the drop-down holder, if necessary // site the control, to allow it access to services from our container
control
Control
control to display
control to display