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

Subversion Repositories or1k_old

[/] [or1k_old/] [tags/] [start/] [insight/] [itcl/] [iwidgets3.0.0/] [demos/] [messagebox] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/bin/sh
2
# ----------------------------------------------------------------------
3
#  DEMO: messagebox in [incr Widgets]
4
# ----------------------------------------------------------------------
5
#\
6
exec itkwish "$0" ${1+"$@"}
7
package require Iwidgets 3.0
8
 
9
. configure -background white
10
 
11
iwidgets::messagebox .mb -hscrollmode dynamic -labeltext "Messages" \
12
    -labelpos n -visibleitems 50x8
13
 
14
pack .mb -padx 5 -pady 5 -fill both -expand yes
15
 
16
.mb type add ERROR -background red -foreground white -bell 1
17
.mb type add WARNING -background yellow -foreground black
18
.mb type add INFO -background white -foreground black
19
 
20
frame .cntls -background white
21
pack .cntls -padx 5 -pady 5 -fill x
22
button .cntls.error -text "Error" -command {
23
    .mb issue "This is an error message in red with a beep" ERROR
24
}
25
pack .cntls.error -side left -expand yes
26
 
27
button .cntls.warning -text "Warning" -command {
28
    .mb issue "This warning message in yellow" WARNING
29
}
30
pack .cntls.warning -side left -expand yes
31
 
32
button .cntls.info -text "Info" -command {
33
    .mb issue "This is an informational message" INFO
34
}
35
pack .cntls.info -side left -expand yes

powered by: WebSVN 2.1.0

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