Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: moving on Grid cells, set Form Font to column font
Message
From
04/08/2003 07:05:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
BUG: moving on Grid cells, set Form Font to column font
Miscellaneous
Thread ID:
00816421
Message ID:
00816421
Views:
57
Hi,

i have found this BUG.

Repro code:
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show

DEFINE CLASS form1 AS form

	Top = 15
	Left = 77
	Height = 144
	Width = 263
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT grid1 AS grid WITH ;
		ColumnCount = 2, ;
		Height = 100, ;
		Left = 14, ;
		RecordSource = "pippo", ;
		Top = 34, ;
		Width = 193, ;
		Name = "Grid1", ;
		Column1.ControlSource = "", ;
		Column1.Name = "Column1", ;
		Column2.FontName = "Arial Alternative", ;
		Column2.FontUnderline = .T., ;
		Column2.Name = "Column2"

	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "thisform.fontname", ;
		Height = 23, ;
		Left = 12, ;
		ReadOnly = .T., ;
		Top = 5, ;
		Width = 194, ;
		Name = "Text1"

	PROCEDURE Load
		CREATE CURSOR pippo ( A I,B C(20) DEFAULT 'ZIPPO')

		APPEND BLANK
		APPEND BLANK
		GO TOP
	ENDPROC

	PROCEDURE grid1.AfterRowColChange
		LPARAMETERS nColIndex
		AFONT(ff)
		this.objects[nColIndex].FontName=ff[ASCAN(ff,this.objects[nColIndex].FontName)+1]
		this.objects[nColIndex].text1.FontName='Courier'
		THISFORM.TEXT1.Refresh
	ENDPROC

ENDDEFINE
Move on cells, form font change.

This occurs because VFP internal code change Form Font for compute some column value, but no restore original Form Font
( change user property within VFP internal code is bad programming for definition).

Fabio
Next
Reply
Map
View

Click here to load this message in the networking platform