DarrinE
asked on
Help with Scrolling SSTAB
I have placed an SSTAB control on a form (MDI Child)
I have to place a scroll bar down one side - so that the user can scroll down past the buttom of the viewable area to see more information.
I have not a clue about how this should be done or even where to start
Pointers to example code ... code solutions etc get the points
MTIA
DarrinE
I have to place a scroll bar down one side - so that the user can scroll down past the buttom of the viewable area to see more information.
I have not a clue about how this should be done or even where to start
Pointers to example code ... code solutions etc get the points
MTIA
DarrinE
What kind of container is your data sitting in on the SSTab?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for the tips guys
I have about 75 editboxes which will be placed on the SSTab - I take it I will have to place these on the Picture control (picInner ??)
I have about 75 editboxes which will be placed on the SSTab - I take it I will have to place these on the Picture control (picInner ??)
You can use this as a startup: http://www.universalthread.com/wconnect/wc.dll?FournierTransformation~2,54,Forum=21,28,1108
If you already have a form you can select all controls in one hit and cut and paste them into picInner.
Consider the following:
In development mode you want to be able to view as may controls as possible. So you want you SSTAB and picOuter to be as large as possible. You can move then picInner up and down within picOuter to edit the controls. In your formload event, resize and position SSTAB and picOuter to their required positions and sizes.
Be aware that there are some bugs with SSTab which were only corrected by VB6 SP5. If you changed the left property of an element the SSTAB display got screwed.
>I have about 75 editboxes which will be placed on the SSTab
With 75 edit boxes you are reaching then point where you should be considering not using textboxes for performance reasons - so it depends on the client's budget and you abillities - it is not so simple to do away with texboxes for $100,000 I can make 350 editboxes appear in less than half a second - if you need better performance it can be acheived.
Hope this helps..
Consider the following:
In development mode you want to be able to view as may controls as possible. So you want you SSTAB and picOuter to be as large as possible. You can move then picInner up and down within picOuter to edit the controls. In your formload event, resize and position SSTAB and picOuter to their required positions and sizes.
Be aware that there are some bugs with SSTab which were only corrected by VB6 SP5. If you changed the left property of an element the SSTAB display got screwed.
>I have about 75 editboxes which will be placed on the SSTab
With 75 edit boxes you are reaching then point where you should be considering not using textboxes for performance reasons - so it depends on the client's budget and you abillities - it is not so simple to do away with texboxes for $100,000 I can make 350 editboxes appear in less than half a second - if you need better performance it can be acheived.
Hope this helps..
I suspect that emoreau's execllent solution works well with a few controls but for raw speed you can't beat:
picInner.Top = - vscroll.value
instead of:
Private Sub ScrollControls()
Dim ctl As Control
For Each ctl In Me.Controls
'Check for controls that don't move
If TypeOf ctl Is VScrollBar Or _
ctl.Name = "cmdStay" _
Then
'do nothing
Else
ctl.Top = ctl.Top + OldScrollPos - VScroll1.Value
End If
Next
OldScrollPos = VScroll1.Value
End Sub
Which potentially could be painfully slow with loads of controls. And also invloves 1600% more software.
picInner.Top = - vscroll.value
instead of:
Private Sub ScrollControls()
Dim ctl As Control
For Each ctl In Me.Controls
'Check for controls that don't move
If TypeOf ctl Is VScrollBar Or _
ctl.Name = "cmdStay" _
Then
'do nothing
Else
ctl.Top = ctl.Top + OldScrollPos - VScroll1.Value
End If
Next
OldScrollPos = VScroll1.Value
End Sub
Which potentially could be painfully slow with loads of controls. And also invloves 1600% more software.
ASKER
many thanks for the assistance ....
tell me more about this 350 controls in under 1/2 a second I am ineterested in this ....
tell me more about this 350 controls in under 1/2 a second I am ineterested in this ....
I didn't say "controls", I said "editboxes", there is a subtle difference.
I will give you more details in a day or so.
I will give you more details in a day or so.
ASKER
hmmm... ok missed that
ASKER
inthedark :
Please look for my question about scrolling into view
DarrinE
Please look for my question about scrolling into view
DarrinE