Learning VisualNEO Web - Forum

Forum Navigation
You need to log in to create posts and topics.

Learning VisualNEO Web

Please tell me how to programmatically change the color of a button or any other element.

Hi @igor-13, welcome to the forum!
Try this: add a Container object, right click it and Edit HTML property. Write some text.
Add a button, double click it and add this code:

SetObjectStyle "Container1" "background-color" "#fba9a9"
SetObjectStyle "Container1" "color" "#ffffff"
SetObjectStyle "Container1" "border" "2px solid red"
SetObjectStyle "Container1" "padding" "10px"
SetObjectStyle "Container1" "font-size" "16px"

Each line change a different property. Play with them. Attached is a sample app (right click to download it).
To change the color of a button you will need to use a different theme than the default one (it uses gradient colors on buttons). Go to the tools menu and choose neoThemeManager, then choose another theme with plain color on buttons.
This way you can change botton colors with the same code than above but using the button name instead of "Container1".
Let me know if you have any doubt.

Uploaded files:
  • You need to login to have access to uploads.
YASIN has reacted to this post.
YASIN