FRBDK/Glue/Glue/Controls/TextInputWindow.cs
/// <summary>
/// Adds a control to the TextInputWindow.  The control will automatically
/// be positioned below the previously-added control.  The spacing can be controlled
/// through the control's Margin property.
/// </summary>
/// <remarks>
/// If you are adding a control after a label, you may need to adjust
/// the label's height.  By default it's bigger than usually desired.
/// </remarks>
/// <param name="control">The control to add</param>
Adds a control to the TextInputWindow.  The control will automatically
be positioned below the previously-added control.  The spacing can be controlled
through the control's Margin property.
Adds a control to the TextInputWindow . The control will automatically be positioned below the previously - added control . The spacing can be controlled through the control ' s Margin property .
public void AddControl(Control control, AboveOrBelow aboveOrBelow = AboveOrBelow.Below)
        {
            bool isFirst = (aboveOrBelow == AboveOrBelow.Below && this.ExtraControlsPanel.Controls.Count == 0)
                ||
                (aboveOrBelow == AboveOrBelow.Above && this.ExtraControlsPanelAbove.Controls.Count == 0)
                ;
            if (isFirst)
            {
                this.Height += 5;
            }
            if (aboveOrBelow == AboveOrBelow.Above)
            {
                this.ExtraControlsPanelAbove.Controls.Add(control);
            }
            else
            {
                this.ExtraControlsPanel.Controls.Add(control);
            }
            this.Height += control.Height;
            this.textBox1.Focus();
            this.DefaultControlPanel.Location = new Point(0, ExtraControlsPanelAbove.Height);
        }
public void AddControl ( Control control , AboveOrBelow aboveOrBelow = AboveOrBelow . Below ) { bool isFirst = ( aboveOrBelow == AboveOrBelow . Below && this . ExtraControlsPanel . Controls . Count == 0 ) || ( aboveOrBelow == AboveOrBelow . Above && this . ExtraControlsPanelAbove . Controls . Count == 0 ) ; if ( isFirst ) { this . Height += 5 ; } if ( aboveOrBelow == AboveOrBelow . Above ) { this . ExtraControlsPanelAbove . Controls . Add ( control ) ; } else { this . ExtraControlsPanel . Controls . Add ( control ) ; } this . Height += control . Height ; this . textBox1 . Focus ( ) ; this . DefaultControlPanel . Location = new Point ( 0 , ExtraControlsPanelAbove . Height ) ; }
Adds a control to the TextInputWindow.
Adds a control to the TextInputWindow .
// below
control
Control
The control to add
The control to add
aboveOrBelow
AboveOrBelow
remarks
If you are adding a control after a label, you may need to adjust
the label's height.  By default it's bigger than usually desired.
If you are adding a control after a label you may need to adjust the label ' s height . By default it ' s bigger than usually desired .