Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use a container across multiple pages in pagefram
Message
From
14/05/2005 07:39:07
 
 
To
13/05/2005 08:41:39
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01013681
Message ID:
01014187
Views:
20
To get the Tab order to work right takes a little code.
  1. Use Bindevent to bind Lostfocus to common method
  2. Create a new method at either the form or pageframe level whichever is your preference.
Form::Init

Local oPage As Page, HiTab, HiControl As TextBox, oControl as textbox

This.pageframe1.ZOrder(1)
This.container1.ZOrder(0)

With This.pageframe1
  For Each oPage In .Pages
    HiTab = 0
    HiControl = ''
    For Each oControl In oPage.Controls
      If Pemstatus(oControl,'Lostfocus',5)
        If oControl.TabIndex > HiTab
          HiTab = oControl.TabIndex 
          HiControl = oControl
        Endif
      Endif
    Endfor
    If Not Empty(HiTab)
      Bindevent(HiControl,'lostfocus',This,'tabhandler',7)
    Endif
  Endfor
ENDWITH
Now create a the method I will call TabHandler
Form::TabHandler
IF INLIST(LASTKEY(),9,13)	&& Only interested in TAB and CR
	this.container1.command1.SetFocus()
ENDIF 
And that's all there is to it.

>Hi Glenn,
>
>> Add this container to the FORM and set it's zorder to 0 (Bring to Front) over the pageframe. It then would exist only once but appear on each page.
>
>Thanks for sharing that technique. For those following this thread, Glenn's technique does work. Unfortunately, its difficult to control how this container fits into the control tab order (TabIndex sequence) when it's brought to the forefront like this.
>
>Malcolm
Previous
Reply
Map
View

Click here to load this message in the networking platform