Welcome to Dream.In.Code
Become a VB Expert!

Join 150,195 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,033 people online right now. Registration is fast and FREE... Join Now!




How do i make a listbox scroll without looping?

 
Reply to this topicStart new topic

How do i make a listbox scroll without looping?

p57
28 Sep, 2008 - 11:52 AM
Post #1

New D.I.C Head
*

Joined: 28 Sep, 2008
Posts: 1

I was wondering how would i make command1_click make my listbox scroll without making it loop?

Thanx in advance
User is offlineProfile CardPM
+Quote Post

falexge
RE: How Do I Make A Listbox Scroll Without Looping?
28 Sep, 2008 - 05:42 PM
Post #2

New D.I.C Head
*

Joined: 1 Aug, 2008
Posts: 7

I'm sorry but it is not possible to scroll a listbox. I reviewed the events and methods exposed by listboxes as well as its sub controls (listbox items) and none of them expose any method for scrolling like EnsureVisible or SetFocus, etc.

Sorry.
Alex
User is offlineProfile CardPM
+Quote Post

akhileshbc
RE: How Do I Make A Listbox Scroll Without Looping?
28 Sep, 2008 - 06:10 PM
Post #3

D.I.C Head
Group Icon

Joined: 26 Sep, 2008
Posts: 177



Thanked: 3 times
Dream Kudos: 50
My Contributions
Me too find it impossible sad.gif
User is offlineProfile CardPM
+Quote Post

thava
RE: How Do I Make A Listbox Scroll Without Looping?
28 Sep, 2008 - 08:53 PM
Post #4

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 486



Thanked: 20 times
Dream Kudos: 50
My Contributions
i think it's posible wait for some time i will go and work on with it


never said it's impossible without trying it
if we can,we can
Everything is posssible


here it is
vb

i = i + 1
If i < ListBox1.ListCount Then
ListBox1.ListIndex = i
End If



This post has been edited by thava: 28 Sep, 2008 - 09:09 PM
User is offlineProfile CardPM
+Quote Post

akhileshbc
RE: How Do I Make A Listbox Scroll Without Looping?
29 Sep, 2008 - 07:42 AM
Post #5

D.I.C Head
Group Icon

Joined: 26 Sep, 2008
Posts: 177



Thanked: 3 times
Dream Kudos: 50
My Contributions
@thava, where will u put that code.
User is offlineProfile CardPM
+Quote Post

thava
RE: How Do I Make A Listbox Scroll Without Looping?
29 Sep, 2008 - 05:31 PM
Post #6

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 486



Thanked: 20 times
Dream Kudos: 50
My Contributions
put this code in command1_click
User is offlineProfile CardPM
+Quote Post

akhileshbc
RE: How Do I Make A Listbox Scroll Without Looping?
29 Sep, 2008 - 05:51 PM
Post #7

D.I.C Head
Group Icon

Joined: 26 Sep, 2008
Posts: 177



Thanked: 3 times
Dream Kudos: 50
My Contributions
Best wishes to all smile.gif
User is offlineProfile CardPM
+Quote Post

jaakko
RE: How Do I Make A Listbox Scroll Without Looping?
5 Oct, 2008 - 02:01 PM
Post #8

New D.I.C Head
*

Joined: 26 Sep, 2008
Posts: 21



Thanked: 2 times
My Contributions
QUOTE(p57 @ 28 Sep, 2008 - 12:52 PM) *

I was wondering how would i make command1_click make my listbox scroll without making it loop?

Thanx in advance


When you take a ListBox in your form and add items to it, the scroll bars appear automatically when you have more items than can be seen without scrolling, so you do not need to write any code.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:37AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month