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 5 made on Tuesday May 28, 2019 at 12:53
sebastian
Long Time Member
Joined:
Posts:
September 2003
93
One question:
I end up doing a lot of attribute assignments like:

btn = GUI.addButton();
btn.visible = false;
btn.font = "verdana.ttf";
btn.fontSize = 10;
btn.color = 0xFFFFFF;
[...]


I suppose there isn't a more efficient way, like e.g.
var properties = {visible:false, font:"verdana.ttf", fontSize:10, color:0xFFFFFF, ... };
btn = GUI.addButton(properties);


The only other solution I found was to loop over the properties object and use the keys as attributes for "btn" and assign the corresponding value.

Sebastian


Hosting Services by ipHouse