Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the %2 in RowColChange?

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

Code:
	Procedure myGrid.AfterRowColChange
	Lparameters nColIndex
	     If This.RowColChange%2 = 1

Can someone tell what the %2 is doing here? I've never seen this in all the years I worked with VFP. The code work without errors.

Thanks,
Stanley

 
% is the modulus operator in VFP. It provides a remainder. So this is saying every other row (%2 of any number = 1, means any odd number divided by two will have a remainder of 1). So something is happening to each odd row, and not to each even row. Maybe a background color change. Could be a way to control colors without using DynamicBackground, since I can't see the rest of the code.


Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top