How to Create a Color Theme For Desktop App

  1. 4 weeks ago

    Dear Friends, I hope you're fine and doing great.

    I'm new in using Xojo. My experience mostly lies in MS Visual Studio. I've been using VB.Net and C# but mostly VB.net that's why I thought Xojo is an alternative framework for making cross platform desktop app.

    I need to make at least a simple color theme for my Xojo Desktop App. Xojo Apps are native and they don't look great on Windows that's why I need a color theme for the entire app. Anybody who can give me a good start point is highly appreciated.

    Thanks in advance.

  2. Emile S

    Jan 22 Europe (France, Strasbourg)

    Can you elaborate a bit (what do you really want to do) ?

    Each window have a background color property. You can set that color (the same for all windows) ?
    (In that simple case, you can add an entry in your Preferences window)…

  3. Thank you for your quick reply. But does this apply even to other controls like buttons, labels, etc?

  4. Emile S

    Jan 22 Europe (France, Strasbourg)
    Edited 4 weeks ago

    I do not believe that: for window background only.

    Excepted if you create your own (or use someone else) Controls, no color property for controls is provided.

    You can read the documentation (http://docs.xojo.com/index.php/ListBox for example) to be sure.

    Christian ?

    Sorry.

    Edit: added the PS below.

    PS: usually, the user interface (Controls, window title/outline rectangle,…) keeps the original colors (Black or Grey outline, black window title area instead of green, red or any other color).

  5. Okay Emile. Thanks for you advice. Let me get my hands dirty with some coding and I will quickly get back here to show the results.

  6. Tim J

    Jan 22 Pre-Release Testers, Xojo Pro Dehydrating in AZ

    @Ngabo A Thank you for your quick reply. But does this apply even to other controls like buttons, labels, etc?

    Hi Ngabo,

    The Xojo-built applications are still Win32, so you don't have the ability to theme everything like you can with WinForms and WPF.

  7. It seems you're true. I've been trying to read the online documentation but nothing works out as I had earlier expected. In WinForms I had the ability to write my own themes and the App would look great which is quite hard with Xojo!!!! Further still, I could write classes that could make my own customized forms and controls but I haven't got even a single example of it in Xojo! What would be your advice to me guys?
    Thanks

  8. Louis D

    Jan 22 Pre-Release Testers, Xojo Pro Montreal, QC, Canada

    It is win32. There are not a lot of options. As was suggested, set each window backcolor manually, each control color manually. Some controls can also be set as transparent. Perhaps the CustomUI add-on from jeremie Leroy could allow you to do what you want. You will have to verify for yourself.

  9. The basic control that I need to use do not have that property. This include buttons, checkboxes, radio buttons, tabpanel among other controls. I've watched a tutorial about the canvas but I can't base on it to create controls like a combobox.
    https://youtu.be/rJsC8IVY9Ng

  10. Emile S

    Jan 24 Europe (France, Strasbourg)

    @Tim s Colored theme can be changed for pc

    Care to explain how ?

  11. Paul S

    Jan 24 Pre-Release Testers, Xojo Pro Europe (Netherlands, Den Haag)

    To me the posting from Tim Starc appears to be spam.
    What has printer offline fix to do with a coloured theme?
    Or am I wrong?

  12. Emile S

    Jan 24 Europe (France, Strasbourg)

    Or meant to the IDE itself who is not the op question…

  13. Dave S

    Jan 24 San Diego, California USA

    @Ngabo A I've watched a tutorial about the canvas but I can't base on it to create controls like a combobox.

    actually you can... it probably isn't worth the effort, but it can be done

  14. Yeah, According to the short video tutorial I watched, it was short and too basic. I remained wondering because even the button made under that video couldn't move!!! When I look at Xojo Controls, they have few properties hence limited ways of manipulating them. But if I can get a good start point, I can go on further to develop my own themes. I'm still waiting for help from someone willing to help me.

  15. Dave S

    Jan 24 San Diego, California USA

    @Ngabo A I'm still waiting for help from someone willing to help me.

    Not sure exactly what you are waiting for or why you think no one is willing to help you.
    For desktop applications, the controls are for the most part native to the specific operating system, and what visual attributes can or cannot be changed are up to that OS. If you want to go beyond that then you create your own controls.

    Just because you WANT to do something, doesn't mean it can be accomplished with a mouseclick, sometime you need to exert some effort.

    And yeah, buttons can be moved, very easily....

  16. brian f

    Jan 24 Pre-Release Testers, Xojo Pro Chilly California

    @Ngabo A People in the Xojo community spend much time helping others here on the forum and that is what makes the community great, but sometimes the help needed can get into more of a one on one training session and that is more in the realm of Hire a Consultant

    Hope this helps you

  17. Jeff T

    Jan 24 Midlands of England, Europe

    If you want to customise everything, you need to draw everything
    Ditch combo boxes.. override the painting of a listbox instead.
    A button is a canvas where you paint the background, and add text
    You need to react to mouse down, mouse up, by adding events to the canvas, which you use as the base for a custom control.

    https://www.youtube.com/watch?v=rJsC8IVY9Ng

    I don't think you are going to find anyone who will work through all of this with you.. it's complex and time-consuming work.
    By all means do something and ask a question when something doesnt do what you expect...

  18. nicolás c

    Jan 28 Pre-Release Testers, Xojo Pro argentina

    @Ngabo A my humble suggestion is that you don't waste time trying to customize the interface on your own. it will take you too long to do it. in this case i recommend you to use the controls already created--> https://www.jeremieleroy.com/products/customui.php

  19. Michel B

    Jan 28 Pre-Release Testers RubberViews.com
    Edited 4 weeks ago

    It is possible to change the color of windows bars with declares. However, Microsoft design guidelines recomend letting the user decide of that as part of the system theme.

    An easy way to control the color of the bar is to emulate it with a canvas on a plain box window.

    Note that the plain box under Windows 10 has a white stripe on top, that you can remove with the declare I posted at Feedback Case #40171

    Oh, small suggestion : you should post in the Windows channel to make it easier to search later.

or Sign Up to reply!