What is your advice for keeping a common “custom color set” for all color components in an app?
I notice TsColorSelect has “ColorDialog : TColorDialog” but this is never assigned, so it just creates and uses a local “cd : TColorDialog” each time, so the custom colors are not saved between clicks.
TsCustomColorBox has a global “ColDlg : TColorDialog” that it uses, so the custom colors are saved.
What I have come up with so far is this:
(in form create)
ColDlg := TsColorDialog.create(nil);
sColorselect1.ColorDialog := ColDlg;
sColorselect2.ColorDialog := ColDlg;
The save and restore them using ColDlg.Customcolors.
Does this seem about right to you?