Results 1 to 2 of 2

Thread: FileListBox

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    19
    I teach a Beginners Visual Basic class and one of my Students asked the following Question:

    Is it possible to display a FileListBox in two columns?

    I am not advanced enough myself to know if this can be done. Any help in the answer would be great.

    Thanks in Advance

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263
    Well, there are a couple ways I can think of to accomplish this. Here's an easy one.

    Setup:
    1 FileListBox
    - Name: File1
    - Visible: False
    1 ListBox
    - Name: List1
    - Columns: 2
    - Sorted: True
    1 CommandButton
    - Name: Command1

    Code:
    Private Sub Command1_Click()
    Dim A
    For A = 0 To File1.ListCount
        List1.AddItem File1.List(A)
    Next
    End Sub
    Basically all you're doing is using a ListBox to replace a FileListBox. Hope this is what you were looking for!
    Phobic

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