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
ThisForm.MyPgf.Page1.AddObject("MyShape","shape")
Thisform.MyPgf.Page1.MyShape.Visible = .T.
Thisform.MyPgf.Page1.MyShape.SpecialEffect = 0
THisForm.MyPgf.Page1.MyShape.Top = 8
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
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
ThisForm.MyPgf.Page1.MyLabel.Top = ThisForm.MyPgf.Page1.MyLabel.Top - 1
Procedure MyCmd2.Click
ThisForm.MyPgf.Page1.MyThemedLabel.Style = 3
EndDefine
Grigore Dolghin
Class Software.