tags:

views:

35

answers:

2

Ok, I created a windows control project....dropped a comboBox on it, wrote some custom code that I wanted on its event ( Text Changed event, etc) ... I can also compile it and drop it on a new WinForms App... good.

But in my sample WinForms app that I want to use it, I cannot access the properties of that combo box.. it does not list them .. properties like SelectedItems, etc...

what Am I doing wrong? this is my first time creating a custom control tho.

Thanks all

A: 

If Intellisense is failing you, it's most likely a misplaced brace, or something similar. Try commenting out lines with errors until your code is error-free, and try intellisensing again.

Robert Harvey
gives me this compile error: "Error 1 'RedLabel.UserControl1' does not contain a definition for 'SelectedIndex' and no extension method 'SelectedIndex' accepting a first argument of type 'RedLabel.UserControl1' could be found (are you missing a using directive or an assembly reference?) "
BDotA
I have also added the Reference of that custom control to my TestApp ... but it still gives that compile error
BDotA
Does your UserControl class have a public property called 'SelectedIndex'? Are you somehow exposing the SelectedIndex of the ComboBox? Please show some code!
Chris Dunaway
A: 

Ok, I could fix that by Inheriting from ComboBox instead of UserConntrol which was generated by the code. so now I am moer confused! so If I had more than one control on that border-less area then how I refer to them in my projects?

BDotA