MathGroup Archive 2005

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

Search the Archive

Re: GUIkit problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56686] Re: GUIkit problem
  • From: dh <dh at metrohm.ch>
  • Date: Wed, 4 May 2005 00:32:51 -0400 (EDT)
  • References: <d57h2q$p8q$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Baba,
Look at your statement: Append[newlist, label2]
This creates an a list with 2 elements and then discards it!
You need "AppendTo" to store the list in newlist.

Sincerely, Daniel

babazaroni at gmail.com wrote:
> Hello,
> 
> I'm new to Mathematica and GUIkit and wonder why the following
> expressions produce a GUI with only the first label (Hello World1!).
> 
> Needs["GUIKit`"];
> label1 := Widget["Label", {"text" -> "Hello World1!"}]
> label2 := Widget["Label", {"text" -> "Hello World2!"}]
> newlist = {label1}
> Append[newlist, label2]
> HelloWorld[] := GUIRunModal[ Widget["Panel", newlist]]
> HelloWorld[]
> 
> This code below works correctly, but I need to dynamically add labels.
> 
> Needs["GUIKit`"];
> mine1 := Widget["Label", {"text" -> "Hello World1!"}]
> mine2 := Widget["Label", {"text" -> "Hello World2!"}]
> HelloWorld[] := GUIRunModal[ Widget["Panel", {label1,label2}]]
> HelloWorld[]
> 
> Thanks,
> 
> Baba
> 


  • Prev by Date: Re: debugging
  • Next by Date: garbage collection and netlink
  • Previous by thread: Re: GUIkit problem
  • Next by thread: managing order of magnitude instead of numbers