-
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...
-
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 :( )
-
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
-
Try starting the VB Application wizard, and select an explorer style project.