Hi,
I'm developing a control (derived from ComboBox) with permanent items
(First, Previous, Next, Last). So, I'd like it's collection of items couldn't
be changed neither in design time nor programmatically.
public class Navigator: ComboBox {
Navigator() {
IntializeComponents();
}
private void InitializeComponents() {
this.Item.AddRange(new string[]{"First", "Previous", "Next", "Last"});
this.SelectedItemChanged += new
SelectedIndexChangedEventHandler(ComboBox_Selected IndexChanged);
}
private void ComboBox_SelectedIndexChanged() {
MessageBox.Show(SelectedIndex.ToString());
}
}
What should I do? I thought override Items property, but I couldn't realize
it.
Thanks in advance,
dmanhr