# I’m going to ask about changing colors

**URL:** <https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659>\
**Category:** Windows\
**Created:** [March 22, 2025, 10:50am UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659 "2025-03-22T10:50:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter\_Shin](https://forum.xojo.com/letter_avatar_proxy/v4/letter/p/4af34b/32.png) [@peter\_Shin](https://forum.xojo.com/u/peter_Shin)\
**Post date:** [March 22, 2025, 10:50am UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/1 "2025-03-22T10:50:44Z")

</div>

I want to set the font or text color for a Window, button, ComboBox, etc.

And I want to specify the font or color for the entire project at once.

---

<div class="post-metadata">

**Author:** ![TimStreater](https://forum.xojo.com/user_avatar/forum.xojo.com/timstreater/32/586_2.png) [@TimStreater](https://forum.xojo.com/u/TimStreater)\
**Post date:** [March 22, 2025, 11:09am UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/2 "2025-03-22T11:09:50Z")

</div>

Sounds like you need to define yourself some preferences, figure out how to store them in (say) an SQLite database and make yourself a prefs pane where you set your defaults. Then you apply those as appropriate throughout the app.

This is the first thing I do with an app.

---

<div class="post-metadata">

**Author:** ![peter\_Shin](https://forum.xojo.com/letter_avatar_proxy/v4/letter/p/4af34b/32.png) [@peter\_Shin](https://forum.xojo.com/u/peter_Shin)\
**Post date:** [March 22, 2025, 3:13pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/3 "2025-03-22T15:13:12Z")

</div>

I want to know why SQL is used to change colors and the reason behind it.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [March 22, 2025, 3:21pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/4 "2025-03-22T15:21:44Z")

</div>

Sometimes when people ask questions worded similar to this they are looking for how to make a user-facing setting. Settings do not need to be SQLite. There are more efficient ways to implement settings.

It would be helpful if you could clarify. Are you looking to implement a user-facing setting in your application? Or are you just looking to change all the control text colors in the project with one change?

---

<div class="post-metadata">

**Author:** ![Arthur\_Couture](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/e9a140/32.png) [@Arthur\_Couture](https://forum.xojo.com/u/Arthur_Couture)\
**Post date:** [March 22, 2025, 3:45pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/5 "2025-03-22T15:45:48Z")

</div>

To follow up on Tim’s post:

If you are looking to implement some standardization for controls that your are adding in the IDE, you could look at subclassing the specific controls.

For example, you could create a subclass of the DesktopBevelButton, then add some code to the Opening Event Handler to set specific properties. That subclassed control is then available in the Control Library, under Project Controls (you may need to scroll pretty far down to find it). As long as all of your DesktopBevelButtons are your subclassed ones, they should behave consistently. If you have already created several DesktopBevelButtons in your project, you can assign their SuperClass to your customized subclass and insure the consistent behaviour/appearance.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [March 22, 2025, 4:08pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/6 "2025-03-22T16:08:25Z")

</div>

No, Themes does not exists in Xojo (except for the IDE itself).

As already set:  
add a Preferences window to choose the color(s) and allow to change the color(s)  
save the default color(s) to ApplicationData using what you want or a small SQLite data base.  
Using SQLite from the start is a good idea considering your – may yhave to add more specific settings to your application.  
But not mandatory. Take the approach yo’re familiar with (or try a new one if you have time).

---

<div class="post-metadata">

**Author:** ![Graham\_Busch](https://forum.xojo.com/user_avatar/forum.xojo.com/graham_busch/32/21827_2.png) [@Graham\_Busch](https://forum.xojo.com/u/Graham_Busch)\
**Post date:** [March 22, 2025, 4:21pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/7 "2025-03-22T16:21:53Z")

</div>

Write a function that extends or passes in a window/desktop window and the iterates through all the controls on the window. Based on control class set font name and colors as you see fit. Pass the font name etc into function or use a global constant in a module.

I do this for “system small” font name which does not seem to exist on windows so I set font size to 10 when I find it.

No need for SQLite etc unless you want users to change / configure at runtime.

If you want themes, pass in an enum for the theme and set color as required.

---

<div class="post-metadata">

**Author:** ![TimStreater](https://forum.xojo.com/user_avatar/forum.xojo.com/timstreater/32/586_2.png) [@TimStreater](https://forum.xojo.com/u/TimStreater)\
**Post date:** [March 22, 2025, 4:39pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/8 "2025-03-22T16:39:21Z")

</div>

I’m not using SQL to change colours. I’m using an SQL database to store values corresponding to various settings. I probably have more than 50 separate user settings for my main app, I’m not going to go fiddling about parsing text to extract values from a text file.That is what databases are for. The user doesn’t do anything with SQL, they enter values in fields, and the Prefs panes then validate the values before storing and applying them.

---

<div class="post-metadata">

**Author:** ![TimStreater](https://forum.xojo.com/user_avatar/forum.xojo.com/timstreater/32/586_2.png) [@TimStreater](https://forum.xojo.com/u/TimStreater)\
**Post date:** [March 22, 2025, 4:40pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/9 "2025-03-22T16:40:47Z")

</div>

> [@Graham\_Busch](#):
>
> No need for SQLite etc unless you want users to change / configure at runtime.

When else is a user going to configure their copy of the app with their account details etc?

---

<div class="post-metadata">

**Author:** ![Graham\_Busch](https://forum.xojo.com/user_avatar/forum.xojo.com/graham_busch/32/21827_2.png) [@Graham\_Busch](https://forum.xojo.com/u/Graham_Busch)\
**Post date:** [March 22, 2025, 6:17pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/10 "2025-03-22T18:17:19Z")

</div>

What I read from original post was they wanted to set colors etc for entire project. To be built or hardcoded. Change it once rebuild app and new colors are used.

Allowing users to customize colors was not asked for. So seemed a little overboard. That was just my interpretation of their post.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [March 22, 2025, 7:31pm UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/11 "2025-03-22T19:31:13Z")

</div>

So, be prepared for this demand.

---

<div class="post-metadata">

**Author:** ![Arnaud\_N](https://forum.xojo.com/user_avatar/forum.xojo.com/arnaud_n/32/21824_2.png) [@Arnaud\_N](https://forum.xojo.com/u/Arnaud_N)\
**Post date:** [March 23, 2025, 8:49am UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/12 "2025-03-23T08:49:48Z")

</div>

> [@TimStreater](#):
>
> I’m not going to go fiddling about parsing text to extract values from a text file.That is what databases are for. The user doesn’t do anything with SQL, they enter values in fields, and the Prefs panes then validate the values before storing and applying them.

With binary files, you avoid both problems.

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [March 23, 2025, 9:18am UTC](https://forum.xojo.com/t/i-m-going-to-ask-about-changing-colors/84659/13 "2025-03-23T09:18:40Z")

</div>

i made a feature request long ago to have a function called as property value.  
this method could get any value at runtime also usefully for translation.

… not found it, i made a new feature request, all of you can vote.  
[https://tracker.xojo.com/xojoinc/xojo/-/issues/78739](https://tracker.xojo.com/xojoinc/xojo/-/issues/78739)
