Start with the name of the object and then a DOT - edtCost.
Next list the property you want to change - edtCost.Font
If there is a + next to the property in the object inspector, you need another DOT and property - edtCost.Font.Color
If the property contains a [ ] on the right you need to enter the value between square brackets [ ]. edtCost.Font.Style := [fsBold];
To clear these properties you add the [ ] with nothing in between - edtCost.Font.Style := [];
If the value on the right of the property does not have a prefix like the font names (no fs or cl preceding), you need to add the value on the right of the := between inverted commas - edtCost.Font.Name := 'Stencil';
If the value on the right has a prefix preceding the name for example fsBold and clBlue you need to add the value without any inverted commas.
For True and False values.
Number values
Changing Colour
Bold, Italic, Underline & Strikeout - Brackets [ ]
No inverted commas
Add a picture to an ImageBox using code:
Before you try to add a picture to an existing image box on the form, using code, you need to do one of the following:
Add a picture using the OI, with the same file extension that you want to code for, and run the program. This process will add the correct classes to your uses clause.
Add the following to the uses of the program - pngimage (for .png) OR jpeg (for .jpg and jpeg).
In Delphi 10 and 11 the picture needs to be saved in the folder named Win32\Debug. In Delphi 2010 save the picture in the same folder as where you saved the program.
The following code can be used to add a picture - imgPic.Picture.LoadFromFile('art.jpg'); - remember the inverted commas and file extension after the file name.
To remember the .Picture look at the OI and see how you would have used the OI to load a picture.
imgPic.Picture