I got a combobox and i want that the string of the selected index will not be possible to edit
how can i do it?
thanks
            Asked
            
        
        
            Active
            
        
            Viewed 746 times
        
    -2
            
            
         
    
    
        cheziHoyzer
        
- 4,803
- 12
- 54
- 81
- 
                    2What are you trying to do ? String of SelectedIndex ? – Saber Amani Jan 01 '13 at 21:56
- 
                    I have a combobox and when the user choose between options he can modify the text. i want that he will couldn't do that – cheziHoyzer Jan 01 '13 at 22:01
- 
                    It's not String of SelectedIndex. – Saber Amani Jan 01 '13 at 22:02
- 
                    I mean what is now selected – cheziHoyzer Jan 01 '13 at 22:04
- 
                    Take a look first before asking the same questions that others have previously asked, such as here: http://stackoverflow.com/questions/598447/how-to-disable-editing-of-elements-in-combobox-for-c – Ric Jan 01 '13 at 22:06
2 Answers
3
            If you want to block the ability to edit the textbox portion of a combobox you should set
 combobox1.DropDownStyle = ComboBoxStyle.DropDownList;
or set the same property using the Properties list in the Form Designer
 
    
    
        Steve
        
- 213,761
- 22
- 232
- 286
 
    