Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More than one tab cycle
Message
From
04/08/2006 17:22:58
Hans-Otto Lochmann
Dr. Lochmann Consulting Gmbh
Frankfurt, Germany
 
 
To
04/08/2006 16:27:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01142829
Message ID:
01143098
Views:
10
Hi Bruce,

thank you for this example. I think I will use it.

Unfortunately there is not time left presently. But when I will come back to this I think I will set up the following schema: The invisible CommandButtons will be place in a container together with the other objects "in between". In the design mode the Tab Order will set the usual way with both invisible CommandButtons at each "ends" (the lowest and highest place in the Tab Order). Then in the Init of the container the objects, which are closest to the invisible CommandButtons, will be evaluated in the way as demonstrated in your code. The names of these "closest" objects will then be stored in appropriate properties of the invisible CommandButtons, so each of them "knows" where to pass the focus to depending on the "direction".

Remains the task to overcome the resistance of the When event against passing the focus anywhere. I will overcome this by having the When event instantiating a Timer object in the container and telling it, where to pass the focus to. When that is done the When event will end. Shortly after that the Timer will execute its Timer event and pass the focus to the appropriate object and removes itself. I tested that already. It works fine.

With that I think the problem is solved. Thanks to everybody for their help.

Greetings

Hans

>Hi Hans
>
>>... Also I did not find a way to address an object by its TabIndex. This >would allow me to call the next or previous object in the tab sequence.
>
>but you can, indirectly. We use the following method of our pageframe class to set focus to a control based on it's tabindex
>
>
>***************************************************************************
>*!*	Method:			SetFocusToControl
>*!*	Purpose:		Set focus to control specified by tnTabIndex, call
>*!* 				from instances of page.activate
>*!*	Author:			10.31.01 bxk
>*!*	Parameters:		tuControl; tabindex or object reference
>*!*	Returns:
>*!*	Modifications:	
>***************************************************************************
>LPARAMETERS tuControl
>
>LOCAL loPage, loControl, lcParameterType
>STORE .NULL. TO loPage, loControl
>STORE SPACE(0) TO lcParameterType
>
>IF PCOUNT() > 0
>   lcParameterType = VARTYPE(tuControl)
>	
>ENDIF
>
>IF THISFORM.lErrOnly
>   RETURN
>	
>ENDIF	
>
>IF lcParameterType = 'N'	&& tabindex
>	
>   WITH THIS
>      loPage = .Pages[.ActivePage]
>         WITH loPage
>            FOR EACH loControl IN .CONTROLS
>		IF PEMSTATUS(loControl, 'TabIndex', 5)
>		   IF loControl.TABINDEX = tuControl ;
>			.AND. PEMSTATUS(loControl, 'SetFocus', 5)
>						
>			loControl.SETFOCUS()
>			EXIT
>						
>		   ENDIF
>					
>		ENDIF
>				
>            ENDFOR
>		
>         ENDWITH
>		
>   ENDWITH
>	
>ELSE
>   IF PEMSTATUS(tuControl, 'SetFocus', 5)
>      tuControl.SetFocus()
>		
>   ENDIF
>	
>ENDIF
>
>RETURN
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform