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

MathGroup Archive 2009

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

Search the Archive

Re: Re: Making a user interface

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99573] Re: [mg99524] Re: Making a user interface
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Fri, 8 May 2009 00:16:20 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200905071035.GAA19369@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

At least under Windows XP and with Mathematica 7.0.1, there seems to be 
a bug with the Panel and InputField mechanism for such an example...

I do the following:

  - click the entry field for Entry1 and type something there ("hello", 
for example);

  - press Tab, which highlights the label "Entry 2:";

  - press Tab again (presumably to get into the entry field for Entry2);

  - begin typing there.

Then the background and outline of the 2nd entry field disappears, 
becoming a uniform gray to match the panel's background.  Already that's 
a bug.

But I can continue typing there, e.g., "goodbye".

Now when I press the calculate button, what appears next to label 
"Answer"" is:  hello Null

Is this bug present for other versions of Windows, or with other OS's?

Bill wrote:
> Hi Jason:
> 
> Here's one example...
> 
> 
> Module[{Entry1 = "", Entry2 = "", Answer = ""}, 
>   Panel[Column[{Row[{"Entry 1: ", 
>        InputField[Dynamic[Entry1], String, Background -> LightCyan]}], 
>      Row[{"Entry 2: ", 
>        InputField[Dynamic[Entry2], String, Background -> LightYellow]}], 
>      Dynamic@Row[{"Answer: ", Answer}], 
>      Row[{Button["Clear", Entry1 = ""; Entry2 = ""; Answer = ""], 
>        Button["Calculate", 
>         Answer = ToExpression[Entry1] ToExpression[Entry2]]}]}], 
>    Style["Enter and Calculate_Multiplication", 16, Bold, Italic]]];
> Framed[%, Background -> LightOrange]
> 
> 
> Hth,
> 
> Bill
> 
> PS. I used Mathematica 6.0.1 with Win XP on a PC.
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: copy and paste to other programs
  • Next by Date: Re: copy and paste to other programs
  • Previous by thread: Re: Making a user interface
  • Next by thread: Re: Re: Re: Making a user interface