OSDN Git Service

* include/winldap.h (ldap_simple_bindW, ldap_simple_bind_sW,
[pf3gnuchains/pf3gnuchains3x.git] / iwidgets / demos / messagebox
1 # ----------------------------------------------------------------------
2 #  DEMO: messagebox in [incr Widgets]
3 # ----------------------------------------------------------------------
4 package require Iwidgets 4.0
5
6 . configure -background white
7
8 iwidgets::messagebox .mb -hscrollmode dynamic -labeltext "Messages" \
9     -labelpos n -visibleitems 50x8
10
11 pack .mb -padx 5 -pady 5 -fill both -expand yes
12
13 .mb type add ERROR -background red -foreground white -bell 1
14 .mb type add WARNING -background yellow -foreground black
15 .mb type add INFO -background white -foreground black
16
17 frame .cntls -background white
18 pack .cntls -padx 5 -pady 5 -fill x
19 button .cntls.error -text "Error" -command {
20     .mb issue "This is an error message in red with a beep" ERROR
21 }
22 pack .cntls.error -side left -expand yes
23
24 button .cntls.warning -text "Warning" -command {
25     .mb issue "This warning message in yellow" WARNING
26 }
27 pack .cntls.warning -side left -expand yes
28
29 button .cntls.info -text "Info" -command {
30     .mb issue "This is an informational message" INFO
31 }
32 pack .cntls.info -side left -expand yes