Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,565 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,889 people online right now. Registration is fast and FREE... Join Now!




to list the listbox from one box to another box but items are reverse

 
Reply to this topicStart new topic

to list the listbox from one box to another box but items are reverse

ahpoohbear
6 May, 2008 - 02:34 AM
Post #1

New D.I.C Head
*

Joined: 6 May, 2008
Posts: 4

[font=Verdana]Hi need help..

i've two list box, original list box and reverse list box. i've added items into the original list box but now i need to put all the items into the reverse list box in a reverse way.

pls assist.. smile.gif
User is offlineProfile CardPM
+Quote Post

Whizzy
RE: To List The Listbox From One Box To Another Box But Items Are Reverse
6 May, 2008 - 03:46 AM
Post #2

Unregistered





QUOTE(ahpoohbear @ 6 May, 2008 - 03:34 AM) *

[font=Verdana]Hi need help..

i've two list box, original list box and reverse list box. i've added items into the original list box but now i need to put all the items into the reverse list box in a reverse way.

pls assist.. smile.gif


You need to enter your code there Poo... Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.

I have no way of knowing what you put in your box, or how you have it formatted. If it's a list of number, or strings... So until we see some code from you, I'm sorry. If you need help getting started, search the forums for "reverse string".



+Quote Post

ahpoohbear
RE: To List The Listbox From One Box To Another Box But Items Are Reverse
6 May, 2008 - 06:32 PM
Post #3

New D.I.C Head
*

Joined: 6 May, 2008
Posts: 4

QUOTE(Whizzy @ 6 May, 2008 - 04:46 AM) *

QUOTE(ahpoohbear @ 6 May, 2008 - 03:34 AM) *

[font=Verdana]Hi need help..

i've two list box, original list box and reverse list box. i've added items into the original list box but now i need to put all the items into the reverse list box in a reverse way.

pls assist.. smile.gif


You need to enter your code there Poo... Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.

I have no way of knowing what you put in your box, or how you have it formatted. If it's a list of number, or strings... So until we see some code from you, I'm sorry. If you need help getting started, search the forums for "reverse string".



hi whizzy..

horray..i've managed to solve my issue..

here's my code:

CODE
for (int i = lstOriginal.Items.Count - 1; i >=0; i--)
{

    lstReverse.Items.Add(lstOriginal.Items[i].ToString());

}


i've two list box, named lstOriginal and lstReverse, side by side. In the add button, it will add all the item, say for eg: apple, orange, in a sorted manner into the lstOriginal list box. So now i have a Reverse button, which i need to switch the reverse, eg: orange, apple, into the lstReverse list box. so that's the code i did in the Reverse button, using a for loop.

so glad that I've managed to solve it...cheers
pooh..

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 11:48PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month