Hi,
I have an application that utilises the Infragistics tab control.
I would like to know if it is possible to attach (at run time) an existing component to a given tab within the tab control, as opposed to dragging a component onto a tab at design time in the design view?
If it's possible, could someone provide a code example?
Many Thanks,
Saquib.
existing component to a given tab
I assume you mean a Control (like a UserControl), not just a Component.
If it's possible, could someone provide a code example?
It's simple - it's just a bit confusing, that the Tabs collection is not a Control Container. Each UltraTab has a reference to a "TabPage" which is a Control Container.
DEFINE VARIABLE oNewTab AS UltraTab NO-UNDO .
DEFINE VARIABLE oNewControl AS YourUserControlClass NO-UNDO.
oNewTab = ultraTabControl1:Tabs:Add ("newtabkey", "newtablabel") .
oNewControl = NEW YourUserControlClass () .
oNewTab:TabPage:Controls:Add (oNewControl).
Thank you. That's been a great help :-)
Can you please provide the perfect code to understand, i am also need of it. very new to this Infragistics. Can you please help me on this.
1) YourUserControlClass - what this should this contain.
2) My requirement creating a tab dynamically and add objects to the tab dynamically.
object contains Two groups with can labels from DB & respective checkboxs
------------------------------------------------------------- ----------------------------------------------------
Label Checkbox checkobox | | Label Checkbox checkbox |
| |
abc v v | | |
cde v v | |
------------------------------------------------------------ -----------------------------------------------------