[]
You can add input components to the InputPanel control through designer or through code.
To add an input component to InputPanel using the designer:
Create a new instance of C1InputPanel class to add the InputPanel control to your form. csharp
private void Form1_Load(object sender, System.EventArgs e)
{
C1InputPanel NewPanel = new C1InputPanel();
Controls.Add(NewPanel);
}
vbnet
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim NewPanel As New C1InputPanel
Controls.Add(NewPanel)
End Sub
Create an instance of the InputImage component, specify the source image and use the Add method to add it to the InputPanel control. csharp
InputImage NewImage = new InputImage();
NewImage.Image = Image.FromFile("[your image location/name]");
NewPanel.Items.Add(NewImage);
vbnet
Dim NewImage As InputImage = New InputImage
NewImage.Image = Image.FromFile ("[your image location/name]")
NewPanel.Items.Add(NewImage)
Run the program and observe that your image now appears in the InputPanel control.
You can remove an input component from the InputPanel control through designer as well as through code.
At design time, in the form window, you can simply select the control and press Delete key to remove an InputPanel component. However, when operating through the C1InputPanel Item Collection Editor, use the following steps to remove a component from the InputPanel control.
Input components can be removed from input panel using the InputComponentCollection.Remove method. The example below removes an InputButton component from the panel.
csharp
c1InputPanel1.Items.Remove(inputButton1);
vbnet
c1InputPanel1.Items.Remove(inputButton1)