summaryrefslogtreecommitdiffstats
path: root/docs/interactive/ask_from_list
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2002-01-29 16:13:04 +0000
committerYves Duret <yduret@mandriva.com>2002-01-29 16:13:04 +0000
commit68cb104a88ae6fef8298acab166dccd464d170b7 (patch)
tree1cf1f7b49a244357a5086dcb24055a6d8576f2b4 /docs/interactive/ask_from_list
parent58be4a692e597d85219f921181c0e7f01f9844cc (diff)
downloaddrakx-68cb104a88ae6fef8298acab166dccd464d170b7.tar
drakx-68cb104a88ae6fef8298acab166dccd464d170b7.tar.gz
drakx-68cb104a88ae6fef8298acab166dccd464d170b7.tar.bz2
drakx-68cb104a88ae6fef8298acab166dccd464d170b7.tar.xz
drakx-68cb104a88ae6fef8298acab166dccd464d170b7.zip
added some snipet coe for example
Diffstat (limited to 'docs/interactive/ask_from_list')
-rwxr-xr-xdocs/interactive/ask_from_list27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/interactive/ask_from_list b/docs/interactive/ask_from_list
new file mode 100755
index 000000000..63c0ee996
--- /dev/null
+++ b/docs/interactive/ask_from_list
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+# Yves Duret <yduret at mandrakesoft.com>
+# license: GPL
+
+use lib qw(/usr/lib/libDrakX);
+use common;
+use interactive;
+
+my %l = (
+ 0 => "Welcome To Crackers",
+ 1 => "Poor",
+ 2 => "Low",
+ 3 => "Medium",
+ 4 => "High",
+ 5 => "Paranoid",
+ );
+
+my $in = 'interactive'->vnew(undef, 'default');
+
+my $level = $in->ask_from_list("window title - ask_from_list",
+ "radio button\nexamples of utilisation of ask_from_list",
+ [ values %l ], $l{2}
+ ) or $in->exit(0);
+
+print "$level\n";
+$in->exit(0);
+