File: tabset2

package info (click to toggle)
blt8.0 2.4f-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 6,440 kB
  • ctags: 6,543
  • sloc: ansic: 57,358; tcl: 10,169; sh: 1,694; makefile: 551
file content (71 lines) | stat: -rwxr-xr-x 1,407 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!../bltwish

source bltDemo.tcl
#bltdebug 100

image create photo bgTile -file ./images/smblue_rock.gif
image create photo label1 -file ./images/mini-book1.gif
image create photo label2 -file ./images/mini-book2.gif
image create photo testImage -file ./images/txtrflag.gif

scrollbar .s -command { .t view } -orient horizontal
tabset .t \
    -relief flat \
    -bd 2 \
    -textside top \
    -side right \
    -rotate 90  \
    -samewidth yes \
    -tiers 2 \
    -scrollcommand { .s set } \
    -tile bgTile \
    -dashes {4 2} \
    -scrollincrement 1 \

set graph .t.graph1
option clear
source graph1.tcl

set graph .t.graph2
option clear
source graph2.tcl

set graph .t.graph3
option clear
source graph3.tcl
set graph .t.graph5
option clear
source barchart2.tcl

label .t.l -image testImage

option clear

#option add *Tab.state disabled

set attributes {
   "Graph \#1" red	.t.graph1  
    "Graph \#2" green	.t.graph2  
    "Graph \#3" cyan	.t.graph3  
    "Graph \#5" yellow	.t.graph5  
    one		orange	.t.l       
}

foreach { label color window } $attributes {
    .t insert end $label -window $window -fill both \
	-selectbackground ${color}1  \
	-background ${color}2 -activebackground ${color}3  
}

.t insert end \
    there bunky another test of \
    a -image label2 widget

table . \
    .t 0,0 -fill both \
    .s 1,0 -fill x 

table configure . r1 -resize none
#focus .t

#.t invoke end