Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

GUIkit problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56674] GUIkit problem
  • From: babazaroni at gmail.com
  • Date: Tue, 3 May 2005 05:26:25 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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


  • Follow-Ups:
  • 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