Results 1 to 4 of 4

Thread: listbox.maximum/adding text to the end of listbox items/listbox1.itemselected....

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2010
    Posts
    56

    listbox.maximum/adding text to the end of listbox items/listbox1.itemselected....

    listbox1.selecteditem.maximum:

    once listbox1.selecteditem hit the button of the listbox i want it to go back up to the top/1st item



    adding text to the end of listbox items:

    want this to my textbox1.text to get added to all of my items in my listbox



    listbox1.selecteditem = progressbar status

    cant explain this^

  2. #2
    Frenzied Member
    Join Date
    Feb 2008
    Location
    Texas
    Posts
    1,288

    Re: listbox.maximum/adding text to the end of listbox items/listbox1.itemselected....

    When you click the button do something like:

    vb Code:
    1. dim value as Object = me.listbox1.selectedvalue 'you can cast it later or put Integer/String/Etc if you know what the type is.
    2.  
    3. me.listbox1.selectedindex = 0

    If you need to add contents of a textbox to a lisbox just do:

    vb Code:
    1. me.listbox1.items.add(me.textbox1.text)

    Justin
    You down with OOP? Yeah you know me!
    MCAD and MCMICKEYMOUSE (vb.net)

    ----

    If it even kinda helps... rate it : )

    Edit a Multi-page .tif file and save.

  3. #3
    Frenzied Member
    Join Date
    Feb 2008
    Location
    Texas
    Posts
    1,288

    Re: listbox.maximum/adding text to the end of listbox items/listbox1.itemselected....

    If you are adding them like:

    vb Code:
    1. me.listbox1.items.add(...

    The selectedValue property will be empty.

    Just do:

    vb Code:
    1. Dim value as object = me.listbox1.selecteditem.tostring

    Justin
    You down with OOP? Yeah you know me!
    MCAD and MCMICKEYMOUSE (vb.net)

    ----

    If it even kinda helps... rate it : )

    Edit a Multi-page .tif file and save.

  4. #4

    Thread Starter
    Member
    Join Date
    Dec 2010
    Posts
    56

    Re: listbox.maximum/adding text to the end of listbox items/listbox1.itemselected....

    Quote Originally Posted by MonkOFox View Post
    When you click the button do something like:

    vb Code:
    1. dim value as Object = me.listbox1.selectedvalue 'you can cast it later or put Integer/String/Etc if you know what the type is.
    2.  
    3. me.listbox1.selectedindex = 0

    If you need to add contents of a textbox to a lisbox just do:

    vb Code:
    1. me.listbox1.items.add(me.textbox1.text)

    Justin
    1st.i need it to be a privatesub i dont know what the good id for that

    2nd.i loaded text box1 with a large list i cant add text to every single line

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width