accessing control properties

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Hi,

I'm a newbie at creating my own controls.
I've created my own control using:
foreach (Control lb_control in this.Controls[0].Controls)

This particular control is a ListBox. How do I access its properties such as
"SelectedItem", "Clear", "Item", etc ??

I can only see lb_control.ResetText(), lb_control.Name, lb_control.Text etc.

Thanks
Andrew
 
Andrew said:
I'm a newbie at creating my own controls.
I've created my own control using:
foreach (Control lb_control in this.Controls[0].Controls)

This particular control is a ListBox. How do I access its properties such as
"SelectedItem", "Clear", "Item", etc ??

I can only see lb_control.ResetText(), lb_control.Name, lb_control.Text etc.

Cast it to a ListBox instead of just to Control.
 
Back
Top