Paradox Community

Items in comp.databases.paradox

Subject:Re: Dark Theme Option?
Date:Tue, 5 Nov 2019 08:53:04 -0600
From:Mark Bannister <>
Paradox has style sheets for forms.  Not sure if you can how to change 
them with code but there is a setstylesheet method.  From the help:
The following example opens a form and then calls getStyleSheet to see 
which style sheet the form is using. If the style sheet is not COREL.FT, 
the code calls setStyleSheet to set it and then calls getStyleSheet 
again to make sure it was set successfully. setStyleSheet requires 
double backslashes in the path, but getStyleSheet returns single 
f Form
; Get and set the style sheet for this form.
if f.getStyleSheet() <> "[INSTALLDIR]\\Paradox\\Corel.ft" then
if f.getStyleSheet() <> "[INSTALLDIR]\\Paradox\\Corel.ft" then
msgStop("Problem", "Could not set the style sheet.")

On 11/5/2019 8:41 AM, Kevin Baker wrote:
> I'm thinking about offering my customers a Light or Dark theme.  I don't 
> want to have two forms of course (a light and dark), so I'm looking for 
> a way to do this through code.  I'm not quite sure of the approach to 
> take.  My initial thought was to create a db with 4 fields:
> ID
> ObjectName (or maybe ObjectClass)
> Light (holds the RGB value)
> Dark  (holds the RGB value)
> On a setup form, the user could select with theme they want, light or 
> dark.  On other forms when they open, I change the color of all objects 
> based on their selection.
> Is this efficient?  To change the color each time a form is opened? 
> Maybe have a hidden text label on the form that is updated after a color 
> change is made.  So if the user selects dark, when the form opens it 
> would get the value of the text label, if it's light, then I'd change 
> all the colors and change the text label to dark.  Then the next time 
> the form is open, the value would be dark, so no need to change the 
> color of the objects.
> I really want to make this dynamic to allow me to tweak colors with the 
> theme and of course add new ones down the road.  Anyone got any ideals, 
> recommendations, warnings, examples, etc.?
> Thanks,
> Kevin

Copyright © 2004