Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two bugs in Visual FoxPro 9 SP1
Message
From
02/10/2006 06:03:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Two bugs in Visual FoxPro 9 SP1
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01158499
Message ID:
01158499
Views:
87
Hi, everyone.

Over the weekend I have found two bugs in VFP9 SP1. I'd be glad if anyone can confirm these.

First bug appears when a label is added in a pageframe, the backstyle is set to opaque and the style is set to 4 (themed background only). When the label's edge reaches the edge of the page, the backstyle goes to transparent by itself.

Second bug is related to themed labels as well: when a label is set to themed, the fontcharset property is ignored.

Repro code:
Public oForm
oForm = CreateObject("MyForm")
oForm.Show()

Define Class myForm As Form
	Name="MyForm"

Add Object MyPgf AS PageFrame With ;
		PageCount = 2

Add Object MyCmd1 As CommandButton With ;
	Caption = "Click here for first bug", ;
	Top = 150, ;
	Left = 200, ;
	Height = 24, ;
	Width = 150

Add Object MyCmd2 As CommandButton With ;
	Caption = "Click here for second bug", ;
	Top = 200, ;
	Left = 200, ;
	Height = 24, ;
	Width = 150

Procedure Init
	*-- Add a shape
	ThisForm.MyPgf.Page1.AddObject("MyShape","shape")
	Thisform.MyPgf.Page1.MyShape.Visible = .T.
	Thisform.MyPgf.Page1.MyShape.SpecialEffect = 0
	THisForm.MyPgf.Page1.MyShape.Top = 8
	
	*-- Add a label over shape
	ThisForm.MyPgf.Page1.AddObject("MyLabel","Label")
	Thisform.MyPgf.Page1.MyLabel.Top = 1
	ThisForm.MyPgf.Page1.MyLabel.Caption = "Test caption"
	ThisForm.MyPgf.Page1.MyLabel.AutoSize = .T.
	ThisForm.MyPgf.Page1.MyLabel.Visible = .T.
	ThisForm.MyPgf.Page1.MyLabel.Style = 4
	ThisForm.MyPgf.Page1.MyLabel.BackStyle = 1
	ThisForm.MyPgf.Page1.MyLabel.Left = 1
	
	
	*-- Add a themed label:
	Thisform.MyPgf.Page1.AddObject("MyThemedLabel", "Label")
	Thisform.MyPgf.Page1.MyThemedLabel.Caption = "This is a romanian text: " + Chr(254) + Chr(186) + Chr(170) + Chr(222)
	Thisform.MyPgf.Page1.MyThemedLabel.Top = 100
	Thisform.MyPgf.Page1.MyThemedLabel.Style = 0
	Thisform.MyPgf.Page1.MyThemedLabel.Autosize = .T.
	Thisform.MyPgf.Page1.MyThemedLabel.FontCharSet = 238
	Thisform.MyPgf.Page1.MyThemedLabel.Visible = .T.
EndProc

Procedure MyCmd1.Click
	*-- Bug 1: Label's backstyle becomes transparent when
	*-- label reaches the pageframe edge.
	ThisForm.MyPgf.Page1.MyLabel.Top = ThisForm.MyPgf.Page1.MyLabel.Top - 1
	

Procedure MyCmd2.Click
	*-- Bug 2: When label's style is set to 3 - themed,
	*-- .FontCharSet property is ignored
	ThisForm.MyPgf.Page1.MyThemedLabel.Style = 3
EndDefine
Grigore Dolghin
Class Software.
Next
Reply
Map
View

Click here to load this message in the networking platform