| View previous topic :: View next topic |
| Author |
Message |
TriSight Regular
Joined: 12 Oct 2004 Posts: 69 Location: Mobile, AL
|
Posted: Oct 12th, 2004 03:18 PM Post subject: Adding backwards to a combo box.. |
|
|
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 |
|
Andir Centurion

Joined: 21 Dec 2003 Posts: 184 Location: Chicago Area
|
Posted: Oct 12th, 2004 10:02 PM Post subject: |
|
|
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 |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Oct 14th, 2004 02:45 PM Post subject: |
|
|
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 |
|
TriSight Regular
Joined: 12 Oct 2004 Posts: 69 Location: Mobile, AL
|
Posted: Oct 14th, 2004 03:49 PM Post subject: |
|
|
<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 ..
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 |
|
Andir Centurion

Joined: 21 Dec 2003 Posts: 184 Location: Chicago Area
|
Posted: Oct 14th, 2004 11:12 PM Post subject: |
|
|
: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 |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Oct 16th, 2004 05:50 PM Post subject: |
|
|
Anytime  _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
|