Show: Delphi
C++
Display Preferences
Setting Field Component Properties at Runtime
From RAD Studio
Go Up to Working with field components Index
Go Up to C++Builder Developer's Guide
You can use and manipulate the properties of field component at run time. Access persistent field components by name, where the name can be obtained by concatenating the field name to the dataset name.
For example, the following code sets the ReadOnly property for the CityStateZip field in the Customers table to True:
CustomersCityStateZip.ReadOnly := True;
CustomersCityStateZip->ReadOnly = true;
And this statement changes field ordering by setting the Index property of the CityStateZip field in the Customers table to 3:
CustomersCityStateZip.Index := 3;
CustomersCityStateZip->Index = 3;