[Xerte] Re: Changing a button label using a script

Dave Burnett d_b_burnett at hotmail.com
Sat Feb 9 16:18:10 GMT 2013



2 things to consider:
You can address the object properties only after it has been instantiated, e.g 
mybuttonrs.setLabel("new label");
only works when the object has been created (the flow has passed through it and it hasn't been erased).It can be off screen somewhere, but it has to exist).
If you want to change a property before the object is actually created, you need to access the XMLNode property and change the appropriate xml string in that node.Then the object will be instantiated using your new value already in place.

From: kent_chesnut at hotmail.com
To: xerte at lists.nottingham.ac.uk
Date: Sat, 9 Feb 2013 09:41:23 -0600
Subject: [Xerte] Re: Changing a button label using a script





Dave,

Thanks so much for your help.  I've said it before and I'll say it again, the Xerte Community makes a great product even better!

Have a great weekend,
Kent

From: d_b_burnett at hotmail.com
To: xerte at lists.nottingham.ac.uk
Date: Sat, 9 Feb 2013 10:38:43 -0500
Subject: [Xerte] Re: Changing a button label using a script






inspect(iconid)debug(iconid)
inspect(rsid)debug(rsid)
Will expose the properties and functions available.
Cheers,Dave

From: kent_chesnut at hotmail.com
To: xerte at lists.nottingham.ac.uk
Date: Sat, 9 Feb 2013 08:57:05 -0600
Subject: [Xerte] Re: Changing a button label using a script





Dave,

Thanks so much for the information.  2 questions:

1. Is there somewhere I should have been able to look to find this myself?

2. Should this also work for radio buttons (and icons in general)?

Have a great weekend,
Kent

From: d_b_burnett at hotmail.com
To: xerte at lists.nottingham.ac.uk
Date: Sat, 9 Feb 2013 09:47:57 -0500
Subject: [Xerte] Re: Changing a button label using a script





Give the button an rs property like mybuttonrs
then:
mybuttonrs.setLabel("new label");


From: kent_chesnut at hotmail.com
To: xerte at lists.nottingham.ac.uk
Date: Sat, 9 Feb 2013 08:37:02 -0600
Subject: [Xerte] Changing a button label using a script





Is it possible to change a button label (or, more generally, any icon property) using a script?
Or is it possible to assign a button label by using a variable in the button's properties?

I'm using Xerte 2.18.
Thanks for any help you can provide.

Have a great weekend,
Kent
 		 	   		  






_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  






_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  






_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  






_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  






_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20130209/7540a700/attachment.html>


More information about the Xerte mailing list