Help with a Custom Control

  • Thread starter Thread starter Keith Smith
  • Start date Start date
K

Keith Smith

I have designed a custom listBox. When I import it into my app (using the
Toolbox bar Add/Remove) and put it on a form it looks fine (like a listBos),
but my code doesn't seem to work with it. For example this code does not
work...

listBox1.Items.Add("hello there");

What am I missing? Is the problem in the original DLL code or in my new
app?
 
Is there a compiler error with this line or does it run but nothing shows up
in the list box? I assume you are exposing the Items property from the
embedded listbox. If it's a runtime problem have you tried stepping
through the code in the debugger to see if "hello there" is really added,
and if so, where it disappears?
 
Back
Top