combobox SelectedIndexChanged event

  • Thread starter Thread starter biffo71
  • Start date Start date
B

biffo71

.... 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 !!
 
biffo71 said:
... 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).
 
the combo is set to dropdown, infact when I write my own value it works
regularly ..

thanks

Bruce Wood ha scritto:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top