[Xerte] Re: setting button width dynamically?

Ron Mitchell ronm at mitchellmedia.co.uk
Thu Feb 9 11:42:03 GMT 2012


Ok cheers - understood and works great!

Setting the button width based on  a multiplication of the number of
characters entered for the button label so that in can be a few words rather
than one - working well!

Cheers

Ron

 

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

 

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

 

This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it. Please do not
use, copy or disclose the information contained in this message or in any
attachment. Any views or opinions expressed by the author of this email do
not necessarily reflect the views of the University of Nottingham. 

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20120209/03cebc15/attachment.html>


More information about the Xerte mailing list