Hi,
How do I programmatically add an infragistics control to a windows form control collection? They are of different types (one is windows, one is infragistics) so it won't compile??
eg Form1.Controls.Add(UltraStatusBar);
Thanks
yes without any problem. Any Form it is described ONLY with code!If you use the Designer, it write the code for you. (look the file like Form1.Designer.cs).
Your example corrected will be:UltraStatusBar usb = new UltraStatusBar()this.Controls.Add(usb);
Obviously you need to know what are you doing.
Note that I wrote a lot of complex application without using the designer mode, I only write code.IMO it's much more faster developping without the designer and this permit you a real control about your application and also you can "design" the UI programmatically when the app is running.
I was getting a problem with another control and use the status bar in the example - this, of course, works fine!!
Normally I drag the control ontot the form and program everything else (I agree that it is much better to program the controls - if nothing else its much easier to read and understand what hasbeen done)
I can't recreate the compile error I was getting.
Thanks for your help