[Xerte] Re: setting button width dynamically?

Julian Tenney Julian.Tenney at nottingham.ac.uk
Thu Feb 9 11:09:56 GMT 2012


You don't need the {}. Set butW upfront and refr to it directly in the properties field. IT doesn't need expressioning - that is done in the engine.

Before you ask 'why do I need it for paths', there are two steps in that case, going from FileLocation + 'blah.file' to 'http://myPathetc' and then evaluating that string for the actual path.

Numbers are numbers.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 09 February 2012 11:06
To: 'Xerte discussion list'
Subject: [Xerte] setting button width dynamically?

Just been quickly trying to dynamically set the width of a button either before it loads or after it has loaded e.g.

tried buttonw=150; in a script before the button
then w property of the button set as {buttonw} e.g. as the expression value
setting the label of the button in this way works fine so not sure why setting the width isn't?

Also tried with a script after the button to resize it after loading e.g. mybutton._width=buttonwidth;

what stupid mistake am I making? ;-)

Cheers
Ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20120209/0b5a45d0/attachment-0001.html>


More information about the Xerte mailing list