Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: Anchor in a Page with pageframe.TabStretch = 1
Message
De
21/06/2004 07:18:16
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Titre:
BUG: Anchor in a Page with pageframe.TabStretch = 1
Divers
Thread ID:
00915590
Message ID:
00915590
Vues:
49
Observed : when TabStretch = 1 and TabOrientation axis is changed,
the anchored control is resized badly.

Expected: when Tabstretch,TabOrientation,TabStyle change,
the anchored control it does not endure movements.

Code:
- run
- change TabOrientation ( optiongroup ) and TabStyle : all ok
- set TabOrientation = 0
- set TabStretch = 1 ( checked )
- set TabOrientation = 2
: == > a label1.move is fired and label is moved, this does not have to happen
- Close
- run another time
- set TabOrientation = 2
- set TabStretch = 1 ( checked )
- set TabOrientation = 0
: == > a label1.move is fired and label disappear ( height is 0 ), this does not have to happen
- resize the form: label1 reappear
- Close
PUBLIC oform1

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

DEFINE CLASS form1 AS form
	AllowOutput = .F.
	Width 		= 500
	
	ADD OBJECT pageframe1 AS pageframe WITH ;
		ErasePage = .T., ;
		TabStretch = 0,	;
		PageCount = 1, ;
		Anchor = (0x0F), ;
		ActivePage = 1, ;
		Top = 12, ;
		Left = 158, ;
		Width = 280, ;
		Height = 205

	ADD OBJECT check1 AS checkbox WITH ;
		Top = 14, ;
		Left = 46, ;
		Height = 17, ;
		Width = 77, ;
		AutoSize = .T., ;
		Caption = "TabStretch", ;
		ControlSource = "thisform.pageframe1.TabStretch", ;
		Name = "Check1"

	ADD OBJECT optiongroup1 AS optiongroup WITH ;
		AutoSize = .T., ;
		ButtonCount = 4, ;
		Value = 1, ;
		Height = 84, ;
		Left = 44, ;
		Top = 68, ;
		Width = 71, ;
		Name = "Optiongroup1", ;
		Option1.Caption = "Top", ;
		Option1.Value = 1, ;
		Option1.Height = 17, ;
		Option1.Left = 5, ;
		Option1.Top = 5, ;
		Option1.Width = 61, ;
		Option1.Name = "Option1", ;
		Option2.Caption = "Bottom", ;
		Option2.Height = 17, ;
		Option2.Left = 5, ;
		Option2.Top = 24, ;
		Option2.Width = 61, ;
		Option2.Name = "Option2", ;
		Option3.Caption = "Left", ;
		Option3.Height = 17, ;
		Option3.Left = 5, ;
		Option3.Top = 43, ;
		Option3.Width = 61, ;
		Option3.Name = "Option3", ;
		Option4.Caption = "Right", ;
		Option4.Height = 17, ;
		Option4.Left = 5, ;
		Option4.Top = 62, ;
		Option4.Width = 61, ;
		Option4.Name = "Option4"

	PROCEDURE Optiongroup1.Valid
		thisform.pageframe1.TabOrientation = this.Value -1
	ENDPROC

	ADD OBJECT check2 AS checkbox WITH ;
		Top = 38, ;
		Left = 46, ;
		Height = 17, ;
		Width = 65, ;
		AutoSize = .T., ;
		Caption = "TabStyle", ;
		ControlSource = "thisform.pageframe1.TabStyle", ;
		Name = "Check2"

	PROCEDURE pageframe1.page1.Init
		this.AddObject('Label1','label')
		WITH this.label1
			.Left = 87
			.Top = 48
			.Width = 40
			.Anchor = (0X0F)
			.BackColor = RGB(255,0,0)
			.Visible = .T.
		ENDWITH
		BINDEVENT(this.label1,'Move',thisform,"eventMove")
		
	PROCEDURE eventMove(a,b,c,d)
		MESSAGEBOX("LABEL IS MOVED")
	
ENDDEFINE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform