How to use gradient colors in app's views and other controls


Napoleone Lattarulo

I tried to find in the properties of Views something to set gradient color for that container, I didn't succeeded in this task, can you help me in this search?

tanks

P.S.
By the way, are there gradient color properties for objects in the container (like buttons) too?


DecSoft

Hello frecciag50,

Here we can consider various things. First of all is the ability to use themes in App Builder: they include various themes we can use in our applications. If we want to use themes (we use the default one at least, but I talk about others too) we need to take care about changes in the app's style, since we can "break" the possible themes usage in someway. In few words, some themes can change the containters' background colors automatically... except if we change it firstly.

Said that, yes, we can apply style to one or more controls, and even to the app's view, and even to app's views who uses certain theme only, etc. A possible simple way to achieve what you wanted is to use the app's Inline CSS option. In that option we can place a code like the below one:

... the above code apply certain gradient style over the "Container1". If we want to apply such code to an entire app's view we can use their name for the CSS identifier: "#View1", "#View2", etc.. Certainly the code appear more or less complex, but furtunately they are generated using the Colorzilla Gradient Editor. Hope this information can be of your interest.



Napoleone Lattarulo

Vale
I am particularly interested in the use of themes in your environment, I will try to do so searching in help or forum.

tanks


DecSoft

Hello frecciag50,

To use app's themes we only need to specify the themes to be included in the application from the app's options dialog. Once we do that we can use the "SetAppTheme" to establish a theme. Please take a look at the "Themes" and "Themes2" samples. Other samples like the "Calculator" one uses themes too.

See the below image:

From the "Included" list of themes we can choose one or more in order to put it availables for the application. The "Default" list of themes allows to choose what theme we want to use by default in the application. Once our application is running, we can use the "SetAppTheme" with the name of one of the "Included" themes in order to change use the specified theme in the application.


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.