]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
Listbox.insert changed.
authorjohnsonm <johnsonm>
Tue, 28 Oct 1997 16:13:27 +0000 (16:13 +0000)
committerjohnsonm <johnsonm>
Tue, 28 Oct 1997 16:13:27 +0000 (16:13 +0000)
peanuts.py

index a9067109067b576b6a5ef7a58d5c8381a733e4c9..49e56ba95bedf1a68b3f6aa7956b607ff09d1450 100755 (executable)
@@ -5,9 +5,9 @@ from snack import *
 screen = SnackScreen()
 
 li = Listbox(height = 3, width = 20, returnExit = 1)
-li.append("First")
-li.append("Second")
-li.append("Third")
+li.append("First", 1)
+li.append("Second", 2)
+li.append("Third", 3)
 rb = RadioBar(screen, (("This", "this", 0),
                        ("Default", "default", 1),
                        ("That", "that", 0)))
@@ -22,6 +22,7 @@ result = g.run_once()
 
 screen.finish()
 
+print result
 print "listbox:", li.current()
 print "rb:", rb.getSelection()
 print "bb:", bb.buttonPressed(result)