diff options
author | jestin | 2004-06-25 18:26:19 +0000 |
---|---|---|
committer | jestin | 2004-06-25 18:26:19 +0000 |
commit | cfc602e2408bf90cce7be62f3f1e940cd5af7172 (patch) | |
tree | f3b3078f308ff676acfee099aa3c0a4268e15b9a /examples/button.tk | |
parent | 43eaf35871578ea498e20ed4f945cce14f8f3032 (diff) | |
download | ivy-c-cfc602e2408bf90cce7be62f3f1e940cd5af7172.zip ivy-c-cfc602e2408bf90cce7be62f3f1e940cd5af7172.tar.gz ivy-c-cfc602e2408bf90cce7be62f3f1e940cd5af7172.tar.bz2 ivy-c-cfc602e2408bf90cce7be62f3f1e940cd5af7172.tar.xz |
j'ajoute des exemples de code dans le CVS. il faudra les intégrer à la doc...
Diffstat (limited to 'examples/button.tk')
-rwxr-xr-x | examples/button.tk | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/button.tk b/examples/button.tk new file mode 100755 index 0000000..c7809ba --- /dev/null +++ b/examples/button.tk @@ -0,0 +1,21 @@ +#!/usr/bin/wish +load ../src/libtclivy.so.3.6 + +proc connect { client action } { } +proc send { } { + global tosend + Ivy::send $tosend +} + +proc dotext {client text} { + global tosend + set tosend $text + puts "text to send set to $text" +} + +Ivy::init "TCLTK" "TCLTK Ready" connect connect +Ivy::start 127.255.255.255:2010 +Ivy::bind "^Ivy Button text=(.*)" dotext +set tosend foo +button .send -command send -text "send msg" +pack .send |