summaryrefslogtreecommitdiffstats
path: root/docs/interactive/ask_from
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
parent58be4a692e597d85219f921181c0e7f01f9844cc (diff)
downloaddrakx-backup-do-not-use-68cb104a88ae6fef8298acab166dccd464d170b7.tar
drakx-backup-do-not-use-68cb104a88ae6fef8298acab166dccd464d170b7.tar.gz
drakx-backup-do-not-use-68cb104a88ae6fef8298acab166dccd464d170b7.tar.bz2
drakx-backup-do-not-use-68cb104a88ae6fef8298acab166dccd464d170b7.tar.xz
drakx-backup-do-not-use-68cb104a88ae6fef8298acab166dccd464d170b7.zip
added some snipet coe for example
Diffstat (limited to 'docs/interactive/ask_from')
-rwxr-xr-xdocs/interactive/ask_from29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/interactive/ask_from b/docs/interactive/ask_from
new file mode 100755
index 000000000..dad69247e
--- /dev/null
+++ b/docs/interactive/ask_from
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+# Yves Duret <yduret at mandrakesoft.com>
+# license: GPL
+
+use lib qw(/usr/lib/libDrakX);
+use interactive;
+
+my $irq=1;
+my $login;
+my $login2="editable";
+my $check;
+my $range=57;
+
+my $in = 'interactive'->vnew(undef, 'default');
+
+$in->ask_from("window title - ask_from",
+ "message\nexamples of utilisation of ask_from",
+ [
+ { label => "enter scalar", val => \$irq },
+ { label => "combo (type=>combo optionnal)", val => \$login, list => ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'], type => 'combo'},
+ { label => "choose from list editable and sorted", val => \$login2, list => ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'], not_edit => 0, sort => 1},
+ { label => "check box", val => \$check, type => "bool", text => "text" },
+ { label => "range", val => \$range, type => 'range', min => 0, max => 100 },
+ ],
+ complete => sub { print "complete\n";print "$irq\n$login\n$range\n"; },
+# focus_out => sub { print "focus_out\n"},
+# changed => sub { print "changed\n"; },
+ ) or $in->exit(0);
+$in->exit(0);