Combobox items displayed in label!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cshuk
    New Member
    • Feb 2007
    • 5

    Combobox items displayed in label!

    Hi ppl i need help wif a project im workin on 2 write my next exam... plz have a look

    -A word must be selected from a combobox(alread y made..) and displayed in a label ( also made..) before any radiobuttons can be selected( fuctions like Uppercase ect.), If the user tries to select a function before selecting a word from the combobox first an error message must be displayed to select a word first.

    and thats it plz have a look at that and tell me your thoughts ta ppl :P
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    The real point is that the label must contain a word before a function is selected.

    In you code handling the radio buttons all you need to do is check to see if there is already a word in label, if not output the error message.

    Comment

    • cshuk
      New Member
      • Feb 2007
      • 5

      #3
      Ta Banfa man for the fast response i sorted that out tho, but still need ur help on another topic :/

      -after the i have selected the item from the combobox and it is displayed in the label, im suppose 2 be able 2 click on a radiobutton 2 convert the text 2 uppercase here it is plz have a look:

      Code:
      if(radioButton1.Checked == true)
      	{
      			   
      	string stringResult;
      	tring str1 = label1.Text;
      			   
      	stringResult = str1.ToUpper();

      Comment

      • tbarto
        New Member
        • Feb 2007
        • 19

        #4
        Originally posted by cshuk
        Ta Banfa man for the fast response i sorted that out tho, but still need ur help on another topic :/

        -after the i have selected the item from the combobox and it is displayed in the label, im suppose 2 be able 2 click on a radiobutton 2 convert the text 2 uppercase here it is plz have a look:

        if(radioButton1 .Checked == true)
        {

        string stringResult;
        tring str1 = label1.Text;

        stringResult = str1.ToUpper();
        Are You saying that after You CHECK the button, the conversion is performed? You may use some Event Handler:


        Code:
        this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
        
        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
        	if(radioButton1.Checked)
        	{
        			   
        	string stringResult;
        	tring str1 = label1.Text;
        			   
        	stringResult = str1.ToUpper();
                }
        }

        Comment

        • cshuk
          New Member
          • Feb 2007
          • 5

          #5
          TA! tbarto got my prob sorted out! i need another solution on randoms...

          I need help to be able 2 click on a radiobutton 2 change the word 2 a random style(Bold, Itelic, Underline) and random size plz paste an example tell me how 2 generate the randoms plz :P TA

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            Look up the functions

            srand - seed the random number generator, should only be called once
            rand - generate a random number, call as often as required

            Comment

            • cshuk
              New Member
              • Feb 2007
              • 5

              #7
              thx ppl for all the help now i can get on wif my studies ta again and keep up the good work :D

              Comment

              Working...