Change a Power button Color in G Web Development Software

Updated Nov 22, 2023

Reported In

Software

  • G Web Development Software

Issue Details

There are no properties in the item panel to change the color of a Power Button in G Web Development Software, is there any alternative to change that property?

Solution

You can change the color of a Power Button in G Web Development software programmatically using CSS. For this follow the next steps:

1. Create a Power Button.
2. Add an HTML class attribute to the button. The HTML class attribute section is located in the Item tab.image.png
3.Create a CSS sheet and add it to the HTML file using the Edit HTML Source button and add the following line

image.png
<link href="support/style.css" rel="stylesheet">

The resulting file will look as the following:
image.png

4. After adding the line Save the file. 
5. In the CSS file add the class mentioned in point 2 and the --ni--true--background property.
image.png
6. Save the file.
7. Run the program.


 

Additional Information

This and other examples related to the style modification in controls and indicators can be explored in the Customize with CSS G Web Development software example. To access those click on Help>>Examples.