Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicForeColor Hangs VFP
Message
From
19/09/2003 12:10:20
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00830521
Message ID:
00830693
Views:
30
David,

>Can you post the property settings of the cbo and the grid and any relevant code fragments?

The field TODEL is normally 0 or 1. If I manually or programatically change it to any number other than 1 (or whatever is in the DynamicForeColor condition), it works fine, otherwise it hangs. If I put a SET STEP ON in the ComboComType.GotFocus() the Page.Activate event fires twice(!), but the does not hang.
** Except for the following, all the Combo properties are VFP defaults
WITH This.ComboComType
	.HelpContextID = iHelpNum
	.WhatsThisHelpID = iHelpNum
	.SelectOnEntry = .T.
	.RowSource = 'oCntnr.aComType'
	.RowSourceType = 5
	.ColumnCount = 1
	.BoundColumn = 1
	.Top = iTextLineTop
	.Left = iLeft
	.Style = 2
	.Width = iCushion + iBarWidth + TXTWIDTH(REPLICATE('a', aTable(iColNum,3)), ;
		ThisForm.FontName, ThisForm.FontSize, 'N') * iDfltFontWidth
	.DisabledForeColor = iDsbldForeColor
	.DisabledBackColor = iDsbldBackColor
	.TabIndex = iTabIndex
ENDWITH

** Except for the following, all the Grid properties are VFP defaults
WITH oGrid
	.RecordSource = This.cCurNm
	.RecordSourceType = 1
	.ColumnCount = 2
	.ReadOnly = .T.
	.Enabled = .T.
	.TabStop = .T.
	.DeleteMark = .F.
	.Left = 1
	.Top = This.LabelGridCom.Top + 15
	.Width = oCntnr.Width - (oCntnr.LabelGridCom.Left + iLeftMargin)
	.Height = MAX(50, oCntnr.Height - 140)
	.HelpContextID = iHelpNum
	.WhatsThisHelpID = iHelpNum
	.TabIndex = iTabIndex
ENDWITH

* for Column1	COMTYPE
i = 1			&& Grid column
iColNum = ASCAN(aTable, 'COMTYPE', 1, -1, 1, 15)	&& Table column
oCol = EVALUATE(cGrid + '.Column' + ALLTRIM(STR(i)))
oCol.ControlSource = oGrid.RecordSource + '.' + aTable[iColNum,1]
oCol.Enabled = .T.
oCol.Alignment = 4
oCol.DynamicForeColor = "IIF(EDITSTAT = 1 OR TODEL = 1, RGB(192,192,192), RGB(0,0,0))"
oCol.Width = TXTWIDTH(REPLICATE('a', aTable[iColNum,3]), ;
	ThisForm.FontName, ThisForm.FontSize, 'N') * iDfltFontWidth
oHead = oCol.Header1
oHead.Caption = 'Type'
oHead.FontBold = .T.

* for Column2	COMDESC
i = i + 1		&& Grid column
iColNum = ASCAN(aTable, 'COMDESC', 1, -1, 1, 15)	&& Table column
oCol = EVALUATE(cGrid + '.Column' + ALLTRIM(STR(i)))
oCol.ControlSource = oGrid.RecordSource + '.' + aTable[iColNum,1]
oCol.Enabled = .T.
oCol.DynamicForeColor = "IIF(EDITSTAT = 1 OR TODEL = 1, RGB(192,192,192), RGB(0,0,0))"
oCol.Width = TXTWIDTH(REPLICATE('5', aTable[iColNum,3]), ;
	ThisForm.FontName, ThisForm.FontSize, 'N') * iDfltFontWidth
oHead = oCol.Header1
oHead.Caption = 'Description'
oHead.FontBold = .F.

** The code that changes the cursor is:
REPLACE SCHEDSTOP WITH dtWhen, ;
   TODEL WITH 1
Thanks for your interest,
David
Previous
Reply
Map
View

Click here to load this message in the networking platform