Simple Homework program (I'm just learning)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Amy Newsome
    New Member
    • Dec 2006
    • 5

    Simple Homework program (I'm just learning)

    TO DO TASK

    Need help with programming the ADD button

    I have a textbox called txtinput where I will enter a task

    After hitting an add button the program should put the text into a listbox called lstoutput

    for example read a book


    but also will need to be numbered

    for example

    1. read a book
    2. write a report

    Thanks for any help

    AMY
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Please post your code :).

    Comment

    • Amy Newsome
      New Member
      • Dec 2006
      • 5

      #3
      Originally posted by kenobewan
      Please post your code :).

      Private Sub btnAdd_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles btnAdd.Click

      ' adds text from txtInput to lstOutput
      lstOutput.Items .Add(txtInput.T ext)
      txtInput.Text = ""


      Thanks,

      AMy

      Comment

      • radcaesar
        Recognized Expert Contributor
        • Sep 2006
        • 759

        #4
        In the click event of the button,

        lstbox.Items.Ad d (Textbox1.Text)

        :)

        Comment

        Working...