473,396 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Custom ComboBox with permanent items

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
Nov 16 '05 #1
0 1093

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Judy | last post by:
How do I create a combobox in a custom menubar to display months like: 1 January 2 February 3 March etc and then assign the month number (1, 2, 3, etc) of the selected month to a...
3
by: Flack | last post by:
Hello, I am beginning to write a custom combobox control. Right now it doesn't do anything special. I created a class that extends ComboBox: public class TimeSelector :...
3
by: Andrew MacLean | last post by:
Hello all, I am fairly new to .NET, though highly experienced in older versions of VB. I am having a problem with a class I created, though. I have created a class called clsListItem based...
5
by: ross kerr | last post by:
Hi All, I am extending the combobox to create a control that selects an item based on the text the user is typing into the text area of the control. I have an issue that occurs only when i...
5
by: VB Newbie | last post by:
I am creating a user control containing a combobox using VB.NET(2003) I want to add 2 public properties "DataSource" and "Items" like the "System.Windows.Forms.ComboBox" here is my code, but it...
8
by: mongphong28 | last post by:
Hi, I'm populating a ComboBox with objects which contain two properties - IntegerValue and StringValue. I display StringValue in the ComboBox form and can retrieve IntegerValue from the...
3
by: Richard Ryerson | last post by:
I have a general DataGridComboBoxColumn that I built using the Example in the .NET 2003 Combined Collection help file (that was a data time picker). I am able to assign a data source and display...
0
by: Mike | last post by:
Hey everyone... I've got three problems with a custom DataGridView column I've built following the "How To: Host Controls in Windows Forms DataGridView Cells" article. The base editing control...
1
by: Saww | last post by:
Hello lately i have been trying to make a custom combobox with a few targets. 1. to create a disabled items 2. to create a seperator item I already managed both properties items. i also managed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.