Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

How to show " select item " for combo box if nothing is selected?

$
0
0

Hi all,

i trying to show  "select item" within my combo box when nothing selected or these is no user input from the dropdown box. i tried it within an "if else" statement but had no success its seems simple but im not sure, any help please ? 

heres my code : 

  else if (selected == "Walls_&_Ceilings")
            {

                 Form mydialog = new Walls_Ceilings(this);
                 mydialog.Show();
            }

            else if (selected == null)
            {
             comboBox1.Text = "---select an item---";
            }

regards 

Ky_Ex


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>