promotion image of download ymail app
Promoted
Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 1 decade ago

How to pass a text value from listbox control to another listbox control in windows application using c#?

3 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    I would imagine you would want to pass the currently selected item to the other listbox, if that is the case then something like this:

    yahoo messes up the code so just put this all on 1 line

    listBox2.Items.Add(

    listBox1.SelectedItem);

    • Commenter avatarLogin to reply the answers
  • 1 decade ago

    why u want do this????

    it is a great question!!!

    if your listboxes are connected to a database (a filed from a table)

    u can INSERT that text to related table and referesh the second list box;

    but if that's not connected to a database, u can add that text as a ListBox.Item then add that Item to your listBox

    another thing!!!!

    I think so u can use any class instead of ListBox, like CheckListBox that allow you check an item after adding to the CheckListBox;

    Because u may need check them after transformation to the second list box!

    Good Luck

    .

    • Commenter avatarLogin to reply the answers
  • ?
    Lv 4
    4 years ago

    i visit ask for forgiveness for her ... for she knows no longer what she's accomplished ... i'm additionally getting mobbed now and it is not lots relaxing ... i think of that's a mirrored photograph from their very own reflect in the strategies ... So whilst those human beings are cranky, then they do tend to discover ... An awl to grind ... in the subsequent line they examine ... yet another poet to feed the gasoline and improve the seed ... we've small ghosts ... as you have pronounced to me ... they do no longer understand what they say and their strategies isn't unfastened ... you're ok ... you're o.k. ... it is not your fault ... they are in basic terms grinding the salt ... Into the open wounds of their very own blunders ... like fates? A notice right here and a twist of fate there ... so then it type of feels ... to chop up the hair ...? i'm sorry for the nasty words from the human beings who pronounced nasty issues to you ... we are the mothers of angels and we are Gods chosen few ... do no longer hardship darling ... shake it off ...and in basic terms snicker ... you're an harmless ... in a foul aftermath ...

    • Commenter avatarLogin to reply the answers
Still have questions? Get your answers by asking now.