Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot see controls on a scrollable form
Message
De
09/01/2013 12:34:59
 
 
À
09/01/2013 09:48:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01561884
Message ID:
01561915
Vues:
75
>Hello all. I have a problem with a scrollable form.
>I place controls on form on form's INIT event. Every control represents work process, and quantity of processes always different and can be huge.
>Controls are placed on form without any problem, but when I try to scroll this form I can only see 32766 pixels of form, and controls which were placed after this line stay unreachable.
>Is this a system restriction? Do we have any workaround?
>Any help will be greatly appreciated.

Normal precison (VScrollSmallChange ) is 10.
Then you can pay max precision for max resolution ( like Heisemberg law :) )

On this example the Container is on 320.000 Top position
on a virtual panel that scroll within the VFox scrollable panel.
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form


	Height = 250
	Width = 358
	ScrollBars = 2
	Caption = "Form1"
	VScrollSmallChange = 1
	LastTop = 0

	ADD OBJECT text1 AS textbox WITH ;
		Height = 23, ;
		Left = 36, ;
		Top = 36, ;
		Width = 100, ;
		Name = "Text1"


	ADD OBJECT text2 AS textbox WITH ;
		Height = 23, ;
		Left = 192, ;
		Top = 180, ;
		Width = 100, ;
		Name = "Text2"


	ADD OBJECT container1 AS container WITH ;
		Top = 320000, ;
		Left = 84, ;
		Width = 133, ;
		Height = 11690, ;
		BackColor = RGB(255,0,0), ;
		Name = "Container1"


	PROCEDURE Scrolled
		LPARAMETERS nDirection
		IF m.nDirection < 4
			DeltaTop = (m.this.ViewPortTop - m.This.LastTop)*9
			&& 1 -> This.VScrollSmallChange = 5 Precison = 5*2 = 10 Max form size = 32XXX*2 = 64XXX
			&& 2 -> This.VScrollSmallChange = 5 Precison = 5*3 = 15 Max form size = 32XXX*3 = 96XXX
			&& ...
			&& 9 -> This.VScrollSmallChange = 1 Precison = 1*10 = 10 Max form size = 32XXX*10 = 32X.XXX

			FOR k=1 TO this.ControlCount
				this.Controls[m.k].Top = this.Controls[m.k].Top - m.DeltaTop
			ENDFOR
			This.LastTop = m.this.ViewPortTop
		ENDIF
	ENDPROC

ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform