Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 6 made on Wednesday May 29, 2019 at 20:38
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Sebastian,

I got your mail but don't have a github userid.

WRT your question, the only solution is the loop as the version of javascript in pronto does not support Object.assign() which would copy properties IIRC, from another object.

var btn = GUI.addButton();
for (var key in properties) {
btn[key] = properties[key];
}


Note that doing color via a property on a button will only work until said button is pressed onscreen. I think you have to call setColor() or setBgColor() on a button.

However, using color and bgColor for panels works just as you would expect.

Another tidbit - The 'transparent' property if used on a panel is like 'no Fill' from the editor. However, if you set a button's 'transparent' property to true, the button cannot be pressed. I often use this undocumented 'feature' to enable/disable buttons without having to hide them.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse