Results 1 to 4 of 4

Thread: Explorer like component ???

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Location
    St-Élie d'Orford, Quebec, Canada
    Posts
    133

    Post

    Hi,

    what I want is the splitter bar between the directories and files of the Explorer. This bar looks snaped to the top
    status bar but I don't know if it's a whole component with a "left side container" and a "right side container". If however someone manages to understand what I want please reply or E-mail me at [email protected]

    thanks...

  2. #2
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355

    Post

    I think Explorer is made up of two Listviews; or maybe 1?
    im not sure.. maybe the listview lets you do the splitter bar? (i haven't used listview )
    buzzwords are the language of fools

  3. #3
    Addicted Member
    Join Date
    May 1999
    Location
    Californ-I- A
    Posts
    207

    Post

    I'm currently writing an explorer clone, which I will then upload to various VB code archives to demonstrate how one could use listview, treview, and image combo to create explorer-like controls. In doing so, I created a splitter in between the ListView and Treeview as follows (This doesn't work with MDI forms):


    First, I placed a picturbox on my form called SplitBar, and gave it 0 border and the highest z-Order. I set this picturebox's MouseIcon to a splitter Icon and it's mousePointer to 99-custom.


    Private Const MIN_SPLITTER = 100 'Minimum splitter from sides of form

    Private Sub SplitBar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then 'Left button is down
    SplitBar.Width = 75 'Widen splitter for resize
    SplitBar.Left = SplitBar.Left + X
    End If
    End Sub

    Private Sub SplitBar_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then 'Left Button came up
    SplitBar.Width = 50 'Restore splitter size

    'Check for minimum splitter position on left
    If SplitBar.Left <= MIN_SPLITTER Then
    SplitBar.Left = MIN_SPLITTER
    End If

    'Check for minimum splitter position on right
    If SplitBar.Left >= frmMain.ScaleWidth - MIN_SPLITTER Then
    SplitBar.Left = frmMain.ScaleWidth - MIN_SPLITTER
    End If

    'Call Form_Resize to re-position controls based
    'on new splitter position
    Form_Resize
    End If
    End Sub




    Then in my form resize event, the width of the treeview was set to the left of the splitter bar, and the left of the listview was set to the splitter bar left + the splitter bar width.

    Hope that helps somewhat
    Micah Carrick
    Visual Basic 6 SP5
    Visual Basic.NET
    Quixotix Software
    [email protected]
    Download QCM 1.0 - Intelligent ActiveX Control Management

  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Post

    Try starting the VB Application wizard, and select an explorer style project.

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