Changing Themes


Donald Walker

I copied an app to a new location. changed the icon, and the name of the app and Title etc. No issues there.

However when I try to change the theme from Slate to Sandstone it does not change. I have done a new build and debug but always see the old slate. Anything I am missing in this process?

As time allows....

Don


Ade Wale
I copied an app to a new location. changed the icon, and the name of the app and Title etc. No issues there.

However when I try to change the theme from Slate to Sandstone it does not change. I have done a new build and debug but always see the old slate. Anything I am missing in this process?

As time allows....

Don

Delete your _Complied folder and save and rebuild your app.


decsoft

Hello Donald,

The edunt suggestion can work, you know, sometimes, for certain changes, it's good to try by deleting the "_Compiled" folder. Anyway, here is some tips about the app's themes. First of all, take a look at samples like the "Calculator" one, which uses themes.

Secondly, remember we can choose a theme to be used by default. And also, we need to specify what themes we wanted to include in our application in order to be available, that is, in order to allow us to switch to one of the availables themes.

The above image shows the "Default" theme. In this case we use the "Default", but we can choose one of the available themes to be the default one in the application, that is, the theme in which the application starts:

The above image shows the available themes. That is, we can choose from the list one or commonly more than one theme in order to be available to be set or "switched" at runtime using the SetAppTheme action.

Once you choose the included themes, you can switch to one of them at runtime. However, the theme change do not implied the application start with that theme. If you want to do that, you must to save the theme when set it (using the SetOption action, for example). Then, in the app "Ready" event you can retrieve such option (the theme name) and use again the "SetAppTheme" action to establish your application theme.

If you follow this steps and anyway you get stucked, please, Donald, post here and I will try to help you as quickly as possible.



Donald Walker

Thanks for the feedback from both ya'll.

Here is what I discovered. If you have a background color specified on any view (in my case 4th view) it will dominate the rest of the app. The text and other attributes change as required but the color gets overwritten,

What say you?


Donald Walker

How would I use code like this to set the style to orange


decsoft

Hello to all,

Thanks for the feedback from both ya'll.

Here is what I discovered. If you have a background color specified on any view (in my case 4th view) it will dominate the rest of the app. The text and other attributes change as required but the color gets overwritten,

What say you?

In fact if we use the object inspector to establish the "background-color" (or any other CSS rule) of an app's view, they are only applied to that view. Probably what happend is you change to the "View4", but, don't select it (maybe I can improve this in the near future) so you set the "background-color" of the app itself, and then, yes, this "background-color" dominates all the views, because the "C" of "CSS", which means "Cascading".



decsoft

Hello,

How would I use code like this to set the style to orange

What the above CSS code means is "apply these 'background-color' and 'color' CSS rules to all elements with the class ".jumbotron". If you put that code in the "Inline CSS" app's option or in one CSS file added to the app too, then, yes, all elements with the class "jumbotron" change their apparence to the specified style.

But since in this thread we start to talking about app's themes, then maybe we have some mistake here. In order to switch to another app's theme we must use the "SetAppTheme" action (once we include the themes we wanted using the the app's options dialog), but we can't change the app's theme using CSS code.

We can modify the current theme using CSS. All the CSS rules we define in the app's "Inline CSS" option or an external CSS file are applied to the current app's theme.

Hope this can help you in some way Donald, but please, post below whatever other questions you have.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.