Results 1 to 3 of 3

Thread: Listbox question - how to set up...

  1. #1
    Helger
    Guest

    Listbox question - how to set up...

    I have a listbox with items in the range from e.g.: -10 to +10 how do I set it up so that it starts 'in the middle i.e. 0?
    I want to be able start from 0 then toggle up towards the higher pos numbers and toggle down towards the neg. numbers.

    thx,

    Helger

  2. #2
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796
    VB Code:
    1. Dim X As Integer
    2.  
    3.   For X = 0 To 20
    4.     List1.AddItem X - 10
    5.   Next
    6.   List1.ListIndex = 20 'Forces the list box to scroll up
    7.   List1.ListIndex = 10

    Does this do it? Not quite clear what you want.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  3. #3
    Helger
    Guest
    That's exactly what I wanted thanks.
    Works fine

    Helger

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width