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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question regarding variable parameters - related to TStringGrid 1

Status
Not open for further replies.

CHeighlund

Programmer
Jun 11, 2007
163
US
I'm trying to call the 'select cell' event for a TStringGrid item from another form, and I keep getting the following error:

"Types of actual and formal var parameters must be identical"

As far as I can tell, the only item that I'm not giving what it wants is the final parameter, which is listed as 'var canselect: boolean'. What kind of value would I need to substitute into the calling statement to get it to let me do this? I've tried True and 1; any other suggestions?
 
var" means that the parameter is "pass by reference" not "pass by value" -- in other words, you need to supply a variable, not a constant. The event handler should be able to put true or false in the parameter and the caller should test this value to see whether or not the cell can in fact be selected.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top