Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » API

Post new topic   Reply to topic
Adding backwards to a combo box..
View previous topic :: View next topic  
Author Message
TriSight
Regular


Joined: 12 Oct 2004
Posts: 69
Location: Mobile, AL

PostPosted: Oct 12th, 2004 03:18 PM    Post subject: Adding backwards to a combo box.. Reply with quote

Okay I know there are a couple of ways to accomplish this task, but I was wondering if there was a simple API call that could be made to add items to a standard combo box where instead of appending to the end of the list it appends to the top (for use as a history combo box).

I know I could do it with databases as a link, and I could do it using a predetermined number with an index and then just shift things manually, but if there is an API call I'd appreciate any help anyone out there could give me.

Thanks
_________________
/=--_The Nomad_--=\
"Men of lofty genius when they are doing the least work are most active. " - Leonardo da Vinci
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Andir
Centurion


Joined: 21 Dec 2003
Posts: 184
Location: Chicago Area

PostPosted: Oct 12th, 2004 10:02 PM    Post subject: Reply with quote

Without the API you'd have to adjust index values to re-arrange the list. I'm not sure at the moment (and to tell you the truth, a little tired from work to try this out), but it should be fairly easy. Again, I'd have to code something up to test out my theory.
_________________
If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too.
Back to top
View user's profile Send private message
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Oct 14th, 2004 02:45 PM    Post subject: Reply with quote

Actually, it's quite simple if I understand correctly... Add to the top?

[vb:1:d73f6e071f]Private Sub Command1_Click()
Static i As Integer

i = i + 1

List1.AddItem i, 0
End Sub[/vb:1:d73f6e071f]
_________________
No one is completely useless. They can at least be an example of what to avoid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
TriSight
Regular


Joined: 12 Oct 2004
Posts: 69
Location: Mobile, AL

PostPosted: Oct 14th, 2004 03:49 PM    Post subject: Reply with quote

<shakes his head in shame> .. my god.. I've been programming in VB for 7 years now and I got stumped on something as simple as this.. good lord someone just please shoot me .. Cry

Thank you for the help.. I promise next time to make it challenging :ermm:
_________________
/=--_The Nomad_--=\
"Men of lofty genius when they are doing the least work are most active. " - Leonardo da Vinci
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Andir
Centurion


Joined: 21 Dec 2003
Posts: 184
Location: Chicago Area

PostPosted: Oct 14th, 2004 11:12 PM    Post subject: Reply with quote

:laugh: Same here, always looking for the hard way out
_________________
If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too.
Back to top
View user's profile Send private message
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Oct 16th, 2004 05:50 PM    Post subject: Reply with quote

Anytime Wink
_________________
No one is completely useless. They can at least be an example of what to avoid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » API All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic