File: cmenu0.tcl

package info (click to toggle)
blt 3.0~1%2B08570046%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 45,556 kB
  • sloc: ansic: 278,852; tcl: 96,434; sh: 3,410; makefile: 2,026; cpp: 374
file content (56 lines) | stat: -rw-r--r-- 1,383 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

package require BLT

set imgData {
    R0lGODlhEAANAMIAAAAAAH9/f///////AL+/vwAA/wAAAAAAACH5BAEAAAUALAAAAAAQAA0A
    AAM8WBrM+rAEQWmIb5KxiWjNInCkV32AJHRlGQBgDA7vdN4vUa8tC78qlrCWmvRKsJTquHkp
    ZTKAsiCtWq0JADs=
}

set src [image create picture -file images/blt98.gif]
set bg white
set dst [image create picture -width 60 -height 60]
$dst resample $src 
if { [file exists ../library] } {
    set blt_library ../library
}

set xbg [blt::background create linear -relativeto .e.m \
		  -highcolor grey0 -lowcolor grey98 -jitter 3]

option add *BltComboMenu.background $xbg

set myIcon ""
blt::comboentry .e \
    -textvariable myText1 \
    -iconvariable myIcon1 \
    -textwidth 0 \
    -width 500 \
    -menu .e.m \
    -exportselection yes \
    -xbutton yes 
	
blt::combomenu .e.m  \
    -restrictwidth min \
    -height 400 \
    -textvariable myText1 \
    -iconvariable myIcon1 \
    -checkbuttonoutlinecolor grey80 \
    -yscrollbar .e.m.ybar \
    -xscrollbar .e.m.xbar
 
blt::tk::scrollbar .e.m.xbar
blt::tk::scrollbar .e.m.ybar

.e.m add -text "Text" -type command
.e.m add -text "Image Fail" -type command -image $dst
.e.m add -text "CheckButton #1" -type checkbutton -variable "var1"
.e.m add -text "CheckButton #2" -type checkbutton -variable "var2"
label .l -image $src
blt::table . \
    0,0 .e -fill x -anchor n  \
    1,0 .l -fill both

after 10000 {
    set var1 1
}