|
-
Nov 10th, 2003, 10:24 PM
#1
Thread Starter
Addicted Member
Listbox add items to the top.
hi, i am adding items to a listbox like:ListBox1.Items.Add("test")
and i was wondering if there is a way to make it add items to the begining of the listbox instead of putting it at the end. Thanks
-
Nov 10th, 2003, 10:44 PM
#2
Lively Member
It is like wiping your ass with silk, I love it!
-
Nov 11th, 2003, 12:41 AM
#3
like this...
VB Code:
ListBox1.Items.Insert(0, "testing") '/// where 0 is the first index number.
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Nov 11th, 2003, 12:52 AM
#4
Addicted Member
try this
Code:
Private Sub btn_add2end_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add2end.Click
ListBox1.Items.Insert(<any index>, "your item")
End Sub
where <anyindex> is between 0 and listbox1.items.count
Last edited by persianboy; Nov 11th, 2003 at 12:55 AM.
-
Nov 11th, 2003, 12:55 AM
#5
he wants them at the beginning though
i was wondering if there is a way to make it add items to the begining of the listbox
so that'd be 0 rather than the ListBox1.Items.Count.
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Nov 11th, 2003, 12:57 AM
#6
Addicted Member
-
Nov 11th, 2003, 01:47 AM
#7
Thread Starter
Addicted Member
Thank you very much!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|