Home > Net >  WinFrom form how to traverse the dotnetbar container groupPanel controls?
WinFrom form how to traverse the dotnetbar container groupPanel controls?

Time:03-01

VS used to own control traversal of empty container control I have used this method
# region through empty specified control
///& lt; Summary>
///to empty all under the control of all controls.
///& lt;/summary>
///& lt; Param name="Con" & gt; Visual controls & lt;/param>
Public void Clear_Control (Control. ControlCollection Con)
{
Foreach (Control C in Con) {//traverse all the controls in the visual component
Be sad etType chtistina georgina rossetti.british poetess if ((). The Name=="TextBox")//determine whether for the TextBox control
If (((TextBox), C). The Visible==true)//judge whether the current control to show the state
((TextBox), C). The Clear ();//to empty the current control
Be sad etType chtistina georgina rossetti.british poetess if ((). The Name=="MaskedTextBox")//determine whether for MaskedTextBox controls
If (((MaskedTextBox), C). The Visible==true)//judge whether the current control to show the state
((MaskedTextBox), C). The Clear ();//to empty the current control
Be sad etType chtistina georgina rossetti.british poetess if ((). The Name=="ComboBox")//determine whether for the ComboBox control
If (((ComboBox), C). The Visible==true)//judge whether the current control to show the state
((ComboBox), C). The Text="";//to empty the current Text controls attribute values
Be sad etType chtistina georgina rossetti.british poetess if ((). The Name=="PictureBox")//determine whether for PictureBox control
If (((PictureBox), C). The Visible==true)//judge whether the current control to show the state
((PictureBox), C). The Image=null;//to empty the current control of Image attribute
}
}
# endregion

But if use groupPanel dotnetbar control in the container, not, should be how to do? The great spirit genuflect is begged

CodePudding user response:

Should be, what's wrong
  •  Tags:  
  • C#
  • Related