Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access - 'Splitter Bar'

Status
Not open for further replies.

hellferret

Programmer
Mar 15, 2001
91
GB
I'm working on a "splitter bar" for Access 2000.

"Splitter bar" - open up Explorer and resize the Folders bar - see how the folders bar is resized and the rest of the room is taken up by the files? That's what it is.

If anyone is interested, let me know and I'll post it here. Just got to clean it up a bit - got a bug to iron out and it should be ready.
 
I did a splitter bar last year. It was ok, but had a little glitch getting the mouse cursor to change when it should, because the rectangle I used as the splitter kept sending itself to the back of the z-order. I'd be interested to see how you handled it, and how you activated the resizing of the controls on either side. Rick Sprague
 
This is what I got so far. Just getting it working in Access before making an ocx out of it. I'm having trouble in setting a minimum and maximum split between the two controls.

ctlPropertyList is a ListView, Frame20 is a frame, boxSplit is a thin control button I am using as the splitter bar.


Dim mstartx As Integer


Private Sub boxSplit_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Screen.MousePointer = 9
mstartx = X
End Sub

Private Sub boxSplit_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next

If Button = 1 Then
Screen.ActiveForm.Painting = False
If (boxSplit.Left < 1100 And X < 0) Or (boxSplit.Left > 6065 And X > 0) Then
Screen.MousePointer = 0
Else
Me.boxSplit.Left = Me.boxSplit.Left - mstartx + X
Me.ctlPropertyList.Width = Me.ctlPropertyList.Width - mstartx + X
Me.Frame20.Left = Me.Frame20.Left - mstartx + X
Me.Frame20.Width = Me.Frame20.Width + mstartx - X
End If

Screen.ActiveForm.Painting = True

Else
Screen.MousePointer = 0
End If
End Sub

Rick, I'd be interested to see how you handled this.

HF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top