Piero,

Please include the part where you call the ColorPickerBox.  You are supposed to 
pass the ColorPickerBox the string, which in the formulation you provide may 
not have the necessary space before the color. 

 I'm unclear on exactly what you are trying to do.  The ColorPickerBox 
substitutes the color the user chooses for $COLOR$ in the script you provide.  
Another possibility is that you are running up against the fact that 
JmolColorPickerBox is writing html and javascript to your page dynamically, but 
does not have a mechanism for updating the script once the box is created.  If 
that is the problem I will have to think on it a little.  We can also consider 
making a version that passes the color to a function of your choosing.  Then 
you could send a script that is modified on the fly.

Jonathan
On Jul 13, 2010, at 8:03 AM, [email protected] wrote:

> Date: Tue, 13 Jul 2010 11:44:57 +0100
> From: P.Canepa <[email protected]>
> Subject: [Jmol-users] problem setting element colors with
>       JmolColorPickerBox
> To: "[email protected]"
>       <[email protected]>
> Message-ID:
>       <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
> 
> Dear all, 
> 
> do you know why  JmolColorPickerBox( doesn't work ? The string  scriptColor = 
> "' color " + element + " $COLOR$'"; s correctly written. 
> 
> 
> 
> var scriptColor =  ""; 
>  function elementSelected(element){
> 
>   scriptColor = "' color " + element + " $COLOR$'";   
>   return scriptColor;
>  }

                         Dr. Jonathan H. Gutow
Chemistry Department                                [email protected]
UW-Oshkosh                                          Office: 920-424-1326
800 Algoma Boulevard                                FAX:920-424-2042
Oshkosh, WI 54901
                http://www.uwosh.edu/facstaff/gutow

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to