Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PAges in a pageframe
Message
 
To
12/01/1999 09:30:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00175008
Message ID:
00175114
Views:
33
Hi Claude,

>Is there a quick way to jump to another page of a pageframe in the form designer of vfp5.

If you pageframe doesn't contain page tabs, the following tool works most of the time. The pageframe must be in edit mode (rightclick and choose Edit). This program displays all pages of the currently selected pageframe in a list and activates the dersired page in the designer:
Local loGoPage
loGoPage = CreateObject("frmGoPage")
If Type("m.loGoPage") == "O"
	loGoPage.Show(1)
Endif

Define Class frmGoPage as Form
	Width = 150
	Height = 100
	Controlbox = .F.
	AutoCenter = .T.
	Caption = "Go to page"
	oPageframe = NULL
	Dimension aPages[1]
	Add Object lstPages as lstGoPage
	Procedure Init
		Local loRef
		loRef = Sys(1270)
		Do While Type("loRef.Parent") == "O"
			If loRef.BaseClass == "Pageframe"
				This.oPageframe = m.loRef
				Exit
			Endif
			loRef = loRef.Parent
		Enddo
		If IsNull(This.oPageframe)
			Return .F.
		Endif
		AMembers(This.aPages,This.oPageframe,2)
		This.lstPages.RowSource = "Thisform.aPages"
		This.lstPages.RowSourceType = 5
		This.lstPages.Requery
		This.lstPages.ListIndex = 1
	EndProc
Enddefine

Define Class lstGoPage as Listbox
	Width = 150
	Height = 100
	Procedure DblClick
		This.Go
	EndProc
	Procedure KeyPress(tnKeyCode,tnFlags)
		If m.tnKeyCode==13
			This.Go
		Endif
		If m.tnKeyCode = 27
			Thisform.Release
		Endif
	EndProc
	Procedure Go
		Local lcPage, llTabs
		lcPage = This.Value
		llTabs = Thisform.oPageframe.Tabs
		Thisform.oPageframe.Tabs = .T.
		Thisform.oPageframe.&lcPage..SetFocus
		If not m.llTabs
			Thisform.oPageframe.Tabs = .F.
		Endif
		Thisform.Release
	Endproc
Enddefine
Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform