Frames Scroll event causing cursor to move to first textbox

N

noname

Hi,

I have a form with 2 frames on it. One on the left containing text
Labels and the other frame on right containing autogenerated
textboxes. the left frame has its scrollbar visible=false whereas the
the right frame has its scrollbar visible=true. Using the right frame
scrollbar, i can scroll the autogenerated textboxes as well as their
corresponding labels lying in left frame, by coding both the frames
SCROLL events. But the problem arises when i try to click inside any
textbox, it moves to the first textbox in the right pane.

my question is: How can i disable scrolling to first textbox everytime
i click inside a textbox?

i think the scroll events for both the frames is causing this to
happen so need to disable the same temporarily, whenever i click a
textbox in right frame, corresponding to its label lying in left
frame.

Anyone knows how to achieve this?
 
N

noname

Hi,

I have a form with 2 frames on it. One on the left containing text
Labels and the other frame on right containing autogenerated
textboxes. the left frame has its scrollbar visible=false whereas the
the right frame has its scrollbar visible=true. Using the right frame
scrollbar, i can scroll the autogenerated textboxes as well as their
corresponding labels lying in left frame, by coding both the frames
SCROLL events. But the problem arises when i try to click inside any
textbox, it moves to the first textbox in the right pane.

my question is: How can i disable scrolling to first textbox everytime
i click inside a textbox?

i think the scroll events for both the frames is causing this to
happen so need to disable the same temporarily, whenever i click a
textbox in right frame, corresponding to its label lying in left
frame.

Anyone knows how to achieve this?

The scroll code for the two frames is:

Private Sub fra_SA_01_Scroll(ByVal ActionX As MSForms.fmScrollAction,
ByVal ActionY As MSForms.fmScrollAction, ByVal RequestDx As Single,
ByVal RequestDy As Single, ByVal ActualDx As MSForms.ReturnSingle,
ByVal ActualDy As MSForms.ReturnSingle)
If blnEvents Then
blnEvents = False
fra_SA_02.ScrollTop = fra_SA_02.ScrollTop + ActualDy
blnEvents = True
End If
End Sub


Private Sub fra_SA_02_Scroll(ByVal ActionX As MSForms.fmScrollAction,
ByVal ActionY As MSForms.fmScrollAction, ByVal RequestDx As Single,
ByVal RequestDy As Single, ByVal ActualDx As MSForms.ReturnSingle,
ByVal ActualDy As MSForms.ReturnSingle)
If blnEvents Then
blnEvents = False
fra_BrandInfo_Outer_02.ScrollLeft =
fra_BrandInfo_Outer_02.ScrollLeft + ActualDx
fra_SA_01.ScrollTop = fra_SA_01.ScrollTop + ActualDy
blnEvents = True
End If

End Sub
 
N

noname

The scroll code for the two frames is:

Private Sub fra_SA_01_Scroll(ByVal ActionX As MSForms.fmScrollAction,
ByVal ActionY As MSForms.fmScrollAction, ByVal RequestDx As Single,
ByVal RequestDy As Single, ByVal ActualDx As MSForms.ReturnSingle,
ByVal ActualDy As MSForms.ReturnSingle)
    If blnEvents Then
        blnEvents = False
        fra_SA_02.ScrollTop = fra_SA_02.ScrollTop + ActualDy
        blnEvents = True
    End If
End Sub

Private Sub fra_SA_02_Scroll(ByVal ActionX As MSForms.fmScrollAction,
ByVal ActionY As MSForms.fmScrollAction, ByVal RequestDx As Single,
ByVal RequestDy As Single, ByVal ActualDx As MSForms.ReturnSingle,
ByVal ActualDy As MSForms.ReturnSingle)
    If blnEvents Then
        blnEvents = False
        fra_BrandInfo_Outer_02.ScrollLeft =
fra_BrandInfo_Outer_02.ScrollLeft + ActualDx
        fra_SA_01.ScrollTop = fra_SA_01.ScrollTop + ActualDy
        blnEvents = True
    End If

End Sub

It seems that on exiting the frame Fra_SA_01, the frame Fra_SA_02
scroll event resets it's scrollbar to the top.

Has anyone come across this issue?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top