SAP Screen Personas
Is there a way in which we can modify the properties of the on screen controls with the script? I mean making a control visible /invisible on the basis of a condition?
Tobias Queck replied
You are both right: Steve hiding a button/control is not supported in Personas, yet. As usual, I cannot promise a feature for the future but I can promise you that we are watching SCN quite closely and take your feedback into consideration for future versions.
So, now, since you know it is not supported, yet, I show you how you can work around this with a trick
- Create a label with no text
- Position the label to the left of your button
- Make sure it has a higher z-index then the button
- Change the background color to the same background as the background of the area behind the button (Note: by default the label background is transparent)
- Very important: make sure that the width of the label is NaN.
- Now, you can create a script button that enters " " into the label to hide the button and another script button that enters "" to show the button
So, why is this working? If the label width is NaN then the label will adjust its width based on the input text. Filling the label with spaces will extend it over your button and because of the solid background color your button is invisble and unclickable.