Introduction -------------------------- Using C1DropDownControl and C1DropDownForm you can achieve to have a list, under which you have almost all the controls.. for e.g. You want a list of RadioButton under ListControl Or you need to have Tree view Control when users click on ListButton. -------------------------- Paragraph Heading -------------------------- C1DropDownControl
Steps to add C1DropDownControl 1. Right Click on reference, Select Add Reference 2. Select from .NET tab, ComponentOne Input 3. Right click on ToolBox, Select Customize Toolbox 4. From .NET Framework Component Tab, Select C1DropdownControl 5. Important: Set the property “DropDownFormClassName” to the one you have created using C1DropDownForm
C1DropDownForm
Steps to add C1DropDownForm 1. Right Click on Project, Select “Add”, Select “Add Inherited Form” 2. Type the name of the form, (Make sure, template must be: Inherited Form) 3. Inheritance Picker dialogbox will appear, Click on Browse. 4. Path: C:\Program Files\ComponentOne Studio.NET\bin\ C1.Win.C1Input.dll” 5. Now, Check Component Name, DropDownForm will appear at the end of the list. 6. Select and click on OK.
PostChanges Event: Occurs when the dropdown form is closed and the changes made by the user in the form must be saved in the control.
e.g. 1
Private Sub frmBIDropDownForm_PostChanges(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles MyBase.PostChanges Dim ctl As Control If Me.DialogResult = DialogResult.OK Then For Each ctl In Me.Controls If TypeOf (ctl) Is TreeView Then If CType(ctl, TreeView).SelectedNode.Text <> "" Then If Not (CType(ctl, TreeView).SelectedNode.Tag Is Nothing) Then OwnerControl.Tag = _ CType(ctl, TreeView).SelectedNode.Tag.LocationID OwnerControl.Value = CType(ctl, TreeView).SelectedNode.Text End If End If End If Next End If End Sub -------------------------- Paragraph Heading -------------------------- -------------------------- Summary -------------------------- You can have almost anything under Listbox control, it can be complete another form. Greetings. --------------------------
|
No responses found. Be the first to respond and make money from revenue sharing program.
|