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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [demos/] [dialogshell] - Blame information for rev 1765

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

Line No. Rev Author Line
1 578 markom
#!/bin/sh
2
# ----------------------------------------------------------------------
3
#  DEMO: dialogshell 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
    .ds configure -modality [.rb get]
21
    .ds activate
22
}
23
pack .activate
24
 
25
#
26
# Build a generic dialog
27
#
28
iwidgets::dialogshell .ds
29
 
30
.ds add dismiss -text "Dismiss" -command {.ds deactivate}
31
.ds default dismiss
32
 
33
#
34
# Add something to the top of the dialog...
35
#
36
set win [.ds childsite]
37
label $win.ex -text "Minimal Dialog\n(put your widgets here)" \
38
    -background black -foreground white \
39
    -width 40 -height 5
40
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.