cancel
Showing results for 
Search instead for 
Did you mean: 

onClick Border Color of Script Button

cristin_charbonneau
Participant
0 Kudos

Good afternoon.

I have a script button acting as a tile on my Personas flavor. I would like the border color of the button to change and stay changed when it is clicked until a new element on the flavor is clicked.

The border color does change properly using the "hover" event but once clicked returns to the "enabled" color event.

I don't know how to use the "disabled" color event. I have it set but it never seems to activate.

I am using SAP Screen Personas SP10.

Kind Regards,

Cristin

Accepted Solutions (0)

Answers (1)

Answers (1)

kmagons
Advisor
Advisor

Hi Cristin,

You can use the scripting engine to dynamically change the border colour of the button.

1) Create or enhance the onClick script for the button by setting the border colour to the desired one. For example:

session.findById("wnd[0]/usr/btnPersonas_161227621439373").setProperty("borderColor", "red");

2) Create or enhance onBeforeRefresh script to reset the dynamic styling after an event occurs such as a button click:

session.findById("wnd[0]/usr/btnPersonas_161227621439373").setProperty("borderColor", "");

Hope, that helps! 🙂

Best regards,

Krists Magons

SAP Screen Personas Dev Team