OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / ALPHALINUX5 / util / ALPHALINUX5 / lib / blt2.4 / demos / tabset3
1 #!/home/people/tkys/Eos/util/ALPHALINUX5/bin/bltwish
2 #!../bltwish
3
4 source bltDemo.tcl
5 #bltdebug 100
6
7 option clear
8
9 image create photo label1 -file ./images/mini-book1.gif
10 image create photo label2 -file ./images/mini-book2.gif
11 image create photo testImage -file ./images/txtrflag.gif
12
13
14 tabset .t \
15     -gap 2 \
16     -textside right \
17     -dashes "5 2" \
18     -side right \
19     -samewidth yes \
20     -highlightcolor yellow \
21     -bd 0 \
22     -tiers 1 \
23     -scrollcommand { .s set } \
24     -scrollincrement 1 
25
26 set graph .t.graph1
27 option clear
28 source graph1.tcl
29
30 set graph .t.graph2
31 option clear
32 source graph2.tcl
33
34 set graph .t.graph3
35 option clear
36 source graph3.tcl
37
38 set graph .t.graph5
39 option clear
40 source barchart2.tcl
41
42 label .t.l -image testImage
43
44 option clear
45
46 option add *Tabset.Tab.font -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
47 #option add *Tabset.Tab.fill both
48
49 set attributes {
50     "Graph \#1" pink    .t.graph1 
51     "Graph \#2" blue    .t.graph2
52     "Graph \#3" cyan    .t.graph3
53     "Graph \#5" yellow  .t.graph5
54     one         salmon  .t.l    
55 }
56
57 foreach { label color window } $attributes {
58     .t insert end $label -window $window \
59         -selectbackground ${color}2  \
60         -background ${color}3 \
61         -activebackground ${color}1 
62 }
63
64 set f [open "../MANIFEST" "r"]
65 for { set i 0 } { $i < 50 } { incr i } {
66     gets $f word
67     .t insert end $word -state normal
68 }
69 close $f
70
71 scrollbar .s -command { .t view } -orient horizontal
72 radiobutton .left -text "Left" -variable side -value "left" \
73     -command { .t configure -side $side -rotate 90 }
74 radiobutton .right -text "Right" -variable side -value "right" \
75     -command { .t configure -side $side -rotate 270 }
76 radiobutton .top -text "Top" -variable side -value "top" \
77     -command { .t configure -side $side -rotate 0 }
78 radiobutton .bottom -text "Bottom" -variable side -value "bottom" \
79     -command { .t configure -side $side -rotate 0 }
80
81 table . \
82     .t 0,0 -fill both -cspan 2 \
83     .s 1,0 -fill x -cspan 2 \
84     .top 2,0 -cspan 2 \
85     .left 3,0 \
86     .right 3,1 \
87     .bottom 4,0 -cspan 2 
88
89 table configure . r1 r3 r4 r2 -resize none
90 focus .t
91
92 .t focus 0
93
94 after 3000 {
95         .t move 0 after 3
96         .t tab configure 3 -state normal 
97 }