MathGroup Archive 2005

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

Search the Archive

GUIkit problem


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: Slow performance on OS X?
  • Next by Date: Re: Plot3D attempt.
  • Previous by thread: Re: Debugging
  • Next by thread: Re: GUIkit problem