#1 2016-11-08 10:52:21

frecciag50
Member
Registered: 2016-10-22
Posts: 6

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

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?

Offline

#2 2016-11-08 10:59:21

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

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

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:

#Container1
{
  background: #1e5799;
  background: -moz-linear-gradient(left,  #1e5799 0%, #207cca 20%, #2989d8 53%, #207cca 83%, #7db9e8 100%);
  background: -webkit-linear-gradient(left,  #1e5799 0%,#207cca 20%,#2989d8 53%,#207cca 83%,#7db9e8 100%);
  background: linear-gradient(to right,  #1e5799 0%,#207cca 20%,#2989d8 53%,#207cca 83%,#7db9e8 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=1 );
}

... 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.

Offline

#3 2016-11-08 11:19:23

frecciag50
Member
Registered: 2016-10-22
Posts: 6

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

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

Offline

#4 2016-11-08 11:21:58

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

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

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:

X04c5YR.png

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.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.