473,378 Members | 1,209 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,378 software developers and data experts.

combobox SelectedIndexChanged event

.... it's driving me crazy ...

I trying to make a zoom-combo like word :
I have my items:
10%
50%
100%
fit to page

and I want, after the user has selected "fit to page", to set the
combo text to a calculated value .

It's impossible !!!

private void cmbZoom_SelectedIndexChanged(object sender,
System.EventArgs e)
{
int newtext=calcVal();
cmbZoom.Text=newtext.ToString() //after this point the new text is
set, and I can see it
} //at this point the old "fit to page" is come back.

thank you for any suggestion !!

Jan 10 '07 #1
2 1872

biffo71 wrote:
... it's driving me crazy ...

I trying to make a zoom-combo like word :
I have my items:
10%
50%
100%
fit to page

and I want, after the user has selected "fit to page", to set the
combo text to a calculated value .

It's impossible !!!

private void cmbZoom_SelectedIndexChanged(object sender,
System.EventArgs e)
{
int newtext=calcVal();
cmbZoom.Text=newtext.ToString() //after this point the new text is
set, and I can see it
} //at this point the old "fit to page" is come back.

thank you for any suggestion !!
What is your combo box's DropDownStyle set to? If it is DropDownList
then the combo box can accommodate only the choices you give it. If it
is DropDown then the combo box can contain any text (but then the user
can also type in a choice not in the choices in the combo box).

Jan 10 '07 #2
the combo is set to dropdown, infact when I write my own value it works
regularly ..

thanks

Bruce Wood ha scritto:
biffo71 wrote:
... it's driving me crazy ...

I trying to make a zoom-combo like word :
I have my items:
10%
50%
100%
fit to page

and I want, after the user has selected "fit to page", to set the
combo text to a calculated value .

It's impossible !!!

private void cmbZoom_SelectedIndexChanged(object sender,
System.EventArgs e)
{
int newtext=calcVal();
cmbZoom.Text=newtext.ToString() //after this point the new text is
set, and I can see it
} //at this point the old "fit to page" is come back.

thank you for any suggestion !!

What is your combo box's DropDownStyle set to? If it is DropDownList
then the combo box can accommodate only the choices you give it. If it
is DropDown then the combo box can contain any text (but then the user
can also type in a choice not in the choices in the combo box).
Jan 11 '07 #3

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

Similar topics

3
by: jcb1269 | last post by:
How do you select an item in a combobox. I've tried the Click events and that works only when I actually click the combobox. I want to select an item in the combbox not the combbox itself. Any...
0
by: George Hartas | last post by:
I am using Visual C# .NET 2003 to make a ComboBox accept both mouse and keyboard selection. For mouse selection code, I double-clicked ComboBox to get the default "comboBox1_SelectedIndexChanged"...
3
by: ScottO | last post by:
I would like the user to have to select something in a System.Windows.Forms.ComboBox. private void MyForm_Load(object sender, System.EventArgs e) { ... comboBox.DataSource = data;...
7
by: NCrum | last post by:
I want to set the Default value of a Combobox for any changeable record and have got this working but it is totaly unsatisfactory see the code below I loop through the items in the Combo looking...
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...
7
by: sparkle | last post by:
Hi Everybody, I'm filling a combobox from a class, which works fine on it's own. But when I insert code to fill in other controls something in the combobox fill is causing the...
2
by: blue_nirvana | last post by:
I use a AddHandler statement in the load event of a form to assoicate a routine with a combobox. When I populate the form, I select the approiate value from the combobox by using...
0
by: peter78 | last post by:
I wanted to implement an autocomplete feature on the combobox where you would type in partial text and it would try to match it for you. It doesn't exist in .Net yet, but I'm guessing it will in...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
2
by: tshad | last post by:
In my VS 2003 Windows Forms page, when I initially fill my ComboBox (SystemList), it goes to the SelectedIndexChanged event which calls the Loademails() function. I then call it again in the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.