OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [demos/] [dialog] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/bin/sh
2
# ----------------------------------------------------------------------
3
#  DEMO: dialog in [incr Widgets]
4
# ----------------------------------------------------------------------
5
#\
6
exec itkwish "$0" ${1+"$@"}
7
package require Iwidgets 3.0
8
 
9
# itkwish interprets the rest...
10
# ----------------------------------------------------------------------
11
iwidgets::radiobox .rb -labeltext "Use modality to\nlock up your\napplication:"
12
pack .rb -padx 4 -pady 4
13
 
14
.rb add none -text "none"
15
.rb add application -text "application"
16
.rb add global -text "global"
17
.rb select none
18
 
19
button .activate -text "Push Me" -command {
20
    .d configure -modality [.rb get]
21
    .d activate
22
}
23
pack .activate
24
 
25
#
26
# Build a generic dialog
27
#
28
iwidgets::dialog .d
29
.d buttonconfigure OK -command {
30
    puts "pushed: OK"
31
   .d deactivate 1
32
}
33
.d buttonconfigure Apply -command {
34
    puts "pushed: Apply"
35
}
36
.d buttonconfigure Cancel -command {
37
    puts "pushed: Cancel"
38
    .d deactivate 0
39
}
40
.d buttonconfigure Help -command {
41
    puts "pushed: Help"
42
}
43
 
44
#
45
# Add something to the top of the dialog...
46
#
47
set win [.d childsite]
48
label $win.ex -text "Standard Dialog\n(put your widgets here)" \
49
    -background black -foreground white \
50
    -width 40 -height 5
51
pack $win.ex -expand yes -fill both -padx 4 -pady 4

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.