i have a procedure intended to prepare a form with a couple of labels and dropdowns. But i cannot change the font color of the label. Can anybody please assist?
I have found a link that says they found the answer, but i cannot make sense of it. How to programmatically alter Font properties in Firemonkey controls
Below is the code for the unit trying to execute the change.
unit procedures; interface Uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, fmx.controls; Procedure resetproductlists; implementation uses main_unit, datalive_unit, AddUniqueItemToComboBox; Procedure resetproductlists; begin With Datalive.products Do Begin Try active := False; params.clear; sql.text := 'select supplier,item,width,height from products'; active := True; Main.Combobox1.clear; Main.Combobox2.clear; Main.Combobox3.clear; Main.Combobox4.clear; Main.Edit1.text := ''; Main.Edit2.text := ''; Main.SpinBox1.Value := 0; Main.label13.text := 'n/a'; Main.label13.StyledSettings := Main.label13.StyledSettings - [TStyledSetting.ssFontColor]; Main.label13.FontColor := TAlphaColors.Aqua; Main.label14.text := 'R 0.00'; Main.label14.FontColor := clBlack; while not eof do Begin try addtocombo(Main.Combobox1, Fieldbyname('supplier').Asstring); addtocombo(Main.Combobox2, Fieldbyname('item').Asstring); addtocombo(Main.Combobox3, Fieldbyname('width').Asstring); addtocombo(Main.Combobox4, Fieldbyname('height').Asstring); finally next; end; End; Finally active := False; End; End; end; end. the addtocombo procedure only inserts the text into the combobox (if it is not already found in it.).
Any assistance would be great. Thank you