Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: How to make an InputField inside of a graphic active...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89592] Re: How to make an InputField inside of a graphic active...
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sat, 14 Jun 2008 05:28:51 -0400 (EDT)
  • References: <g2th4e$7j4$1@smc.vnet.net>

David,

It does appear that InputField will not operate inside an Inset, whereas 
Checkbox and Slider, at least, will work.

However, putting the dynamic input within the graphics might be slightly 
iffy, especially if it can alter the graphics in a way to overlay the 
control elements. Why not keep the control elements outside of the graphical 
field. Something like the following:

DynamicModule[
 {\[Omega] = 1},
 Column[{
   Item[Style["Graphic with Dynamic InputField", 16, "Panel",
     Background -> None],
    Alignment -> Center],
   Item[Row[{"Inter \[Omega]:  ",
      InputField[Dynamic[\[Omega]], ImageSize -> 100]}],
    Alignment -> Left],
   Dynamic@Plot[Sin[\[Omega] t], {t, 0, 2 \[Pi]},
     ImageSize -> 300]
   }]
 ]



-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"David Reiss" <dbreiss at gmail.com> wrote in message 
news:g2th4e$7j4$1 at smc.vnet.net...
> One can place, say, a Checkbox in a graphic using Inset:
>
> Deploy[Graphics[{LightGray, Disk[], Inset[Checkbox[]]}]]
>
> and the resulting Checkbox is active: i.e., you can click on it and
> the expected behavior happens.
>
> Now if I try to do this with an InputField as in
>
> Deploy[Graphics[{LightGray, Disk[], Inset[InputField[]]}]]
>
> The resulting Inputfield cannot be accessed in the familiar way: i.e.,
> clicking inside of it and then typing.
>
> Do the Group members have a suggestion for how to do this sort of
> thing with an InputField.
>
> This, of course, is a distilled version of something else.  I am
> building a CAD application for a customer, and I would like to place
> input fields within the visual design that is being created so that
> values can be assigned to various things.  This behavior would be
> toggeled on and off as needed...
>
> thanks for any help that you folks can give....
>
> --David
>
>
> 



  • Prev by Date: Re: Manipulate: Positioning of controls within panel
  • Next by Date: Re: Persistent addition to recently opened? Was Re: Notebooks location
  • Previous by thread: How to make an InputField inside of a graphic active...
  • Next by thread: Re: How to make an InputField inside of a graphic active...