HobbyProgrammer
Programmer
Hello
Would like to pass e.g. Edit.Text or ComboBox.Text or ComboBox.Items as a var into e.g.
Procedure DefineMyComponents(var Edit.Text : String;
var Box.Text : Sting;
var Box.Items : Tstrings);
by calling it e.g. with
DefineMyComponents(MyForm.Edit1.Text,
MyForm.ComboBox1.Text,
MyForm.ComboBox1.Items);
The Compiler (D5S) does not accept this. But how should it be done?
If I pass the complete component as a var parameter it works, like
Procedure DefineMyComponents(var Edit : TEdit;
var Box : TcomboBox);
But how should it be done if one only would like to pass parts of the component (and not the complete component)?
Would like to pass e.g. Edit.Text or ComboBox.Text or ComboBox.Items as a var into e.g.
Procedure DefineMyComponents(var Edit.Text : String;
var Box.Text : Sting;
var Box.Items : Tstrings);
by calling it e.g. with
DefineMyComponents(MyForm.Edit1.Text,
MyForm.ComboBox1.Text,
MyForm.ComboBox1.Items);
The Compiler (D5S) does not accept this. But how should it be done?
If I pass the complete component as a var parameter it works, like
Procedure DefineMyComponents(var Edit : TEdit;
var Box : TcomboBox);
But how should it be done if one only would like to pass parts of the component (and not the complete component)?