Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Frames Scroll event causing cursor to move to first textbox

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Frames Scroll event causing cursor to move to first textbox

On Nov 29, 12:02*am, noname wrote:
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Frames Scroll event causing cursor to move to first textbox

On Nov 28, 2:06*pm, noname wrote:
On Nov 29, 12:02*am, noname wrote:



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


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?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move the cursor to end of data in textbox Sir Tom Excel Programming 2 January 26th 07 03:51 AM
Excel: Arrows scroll sheet instead of move cursor. How to switch Turely Truely Excel Discussion (Misc queries) 2 October 31st 06 07:50 PM
Move cursor to textbox in a userform jgmiddel[_4_] Excel Programming 5 March 29th 06 02:55 PM
How to move cursor from one textbox control to another textbox con Tom Ogilvy Excel Programming 1 September 16th 04 03:42 PM
How to move cursor from one textbox control to another textbox con KMoore007 Excel Programming 0 September 16th 04 02:47 PM


All times are GMT +1. The time now is 07:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"