MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: problem with Inset moving text

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85557] Re: problem with Inset moving text
  • From: Daniel Huber <dh at metrohm.ch>
  • Date: Wed, 13 Feb 2008 07:16:08 -0500 (EST)
  • References: <fouehg$m9f$1@smc.vnet.net>

Hi Camille,
the text is centered. Therefore, it will move when the length changes. 
To prevent this, either make the number always the same size:
NumberForm[c // N, {4, 3}]
or even better, place the text at an definite location by useing the 
second and third argument of Inset:
Manipulate[Graphics[{Circle[],Inset[Style[StringJoin["value:",ToString[NumberForm[c//N,{4,3}]]],Blue,20],{-.3,0},{-1,-1}]}],{{c,(2 
\[Pi])/3,"Value c"},-1,2 Pi,0.001}]
hope this helps, Daniel
Camille JORDAN wrote:
> I am trying to use Inset but have a problem in 6.0.1
> 
> see this code
> 
> Manipulate[
>  Graphics[
>   {Circle[],
>    Inset[Style[StringJoin["value:", ToString[N[c]]], Blue, 20]]
>    }
>   ]
>  , {{c, (2 \[Pi])/3, "Value c"}, -1, 2 Pi, 0.001}]
> 
> use the slide to go to value 1.609
> and then it jumps into value 1.61
> the problem I have is that the text jumps horizontaly
> 
> any way to make the text fix so it will not jump?
> this happens because the numbers 1.609 and 1.61 are different in leght
> any solution?
> 


  • Prev by Date: Re: FindMaximum query
  • Next by Date: Re: Re: Reduce in Ver 6
  • Previous by thread: Re: problem with Inset moving text
  • Next by thread: Re: problem with Inset moving text