view release on metacpan or search on metacpan
demos/MkSample.tcl
demos/MkScroll.tcl
demos/tclIndex
demos/tixwidgets.tcl
demos/widget
demos/bitmaps/about.xpm
demos/bitmaps/bold.xbm
demos/bitmaps/capital.xbm
demos/bitmaps/centerj.xbm
demos/bitmaps/code.xpm
demos/bitmaps/combobox.xbm
demos/bitmaps/combobox.xpm
demos/bitmaps/drivea.xbm
demos/bitmaps/drivea.xpm
demos/bitmaps/exit.xpm
demos/bitmaps/filebox.xbm
demos/bitmaps/filebox.xpm
demos/bitmaps/harddisk.xbm
demos/bitmaps/harddisk.xpm
demos/bitmaps/italic.xbm
demos/bitmaps/justify.xbm
demos/bitmaps/leftj.xbm
tests/option.test
tests/README
tests/tclIndex
tests/Test.tcl
tests/TODO.txt
tests/widgetTestClass1.tcl
tests/cleanup/cleanup.tcl
tests/cleanup/files
tests/general/api.tcl
tests/general/cmderror.tcl
tests/general/combobox.tcl
tests/general/dirbox.tcl
tests/general/draw.tcl
tests/general/event0.tcl
tests/general/filebox.tcl
tests/general/files
tests/general/fs.tcl
tests/general/labentry.tcl
tests/general/minterp.tcl
tests/general/mwm.tcl
tests/general/NoteBook.tcl
demos/bitmaps/combobox.xbm view on Meta::CPAN
#define combobox_width 32
#define combobox_height 32
static unsigned char combobox_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfc, 0xff, 0xff, 0x3e, 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2a,
0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2b, 0xfc, 0xff, 0xff, 0x3e,
0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a,
0x28, 0x49, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x22,
0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x12, 0x22, 0x08, 0x00, 0x00, 0x22,
0x08, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x02, 0x22,
0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x2a,
0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
demos/bitmaps/combobox.xpm view on Meta::CPAN
/* XPM */
static char * combobox_xpm[] = {
"50 40 6 1",
" s None c None",
". c black",
"X c white",
"o c #FFFF80808080",
"O c gray70",
"+ c #808000008080",
" ",
" ",
" ",
demos/samples/ComboBox.tcl view on Meta::CPAN
# executed from the Tix demo program "widget": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program using tixwish.
# This file demonstrates the use of the tixComboBox widget, which is close
# to the MS Window Combo Box control.
#
proc RunSample {w} {
# Create the comboboxes on the top of the dialog box
#
frame $w.top -border 1 -relief raised
# $w.top.a is a drop-down combo box. It is not editable -- who wants
# to invent new months?
#
# [Hint] The -options switch sets the options of the subwidgets.
# [Hint] We set the label.width subwidget option of both comboboxes to
# be 10 so that their labels appear to be aligned.
#
tixComboBox $w.top.a -label "Month: " -dropdown true \
-command cbx:select_month -editable false -variable demo_month \
-options {
listbox.height 6
label.width 10
label.anchor e
}
demos/tixwidgets.tcl view on Meta::CPAN
$w.cbx2 insert end 8
$w.cbx2 insert end 10
$w.cbx2 insert end 12
$w.cbx2 insert end 14
$w.cbx2 insert end 18
$w.cbx1 pick 1
$w.cbx2 pick 3
# Pack the comboboxes together
#
pack $w.cbx1 $w.cbx2 -side left -padx 4 -pady 4
$demo(balloon) bind $w.cbx1\
-msg "Choose\na font" -statusmsg "Choose a font for this page"
$demo(balloon) bind $w.cbx2\
-msg "Point size" -statusmsg "Choose the font size for this page"
tixDoWhenIdle tixDemo:MainTextFont $top
docs/tix-book/intro.tex.html view on Meta::CPAN
entry widget and a listbox widget. Usually, the ComboBox contains a
list of possible values for the user to select. The user may also
choose an alternative value by typing it in the entry widget. Figure
<a href=intro.tex.html#1-8>1-8 </a> shows two ComboBoxes for the user to choose fonts and
character sizes. You can see fro the figure that a listbox is popped
down from the ComboBox for fonts for the user to choose among a list
of possible fonts.
<p>
<blockquote><a name=1-8>
<center><img src=fig/intro/combobox.gif></center>
<hr><center><h3>(Figure 1-8) The TixComboBox Widget</center></h3>
</blockquote>
<p><H3><A NAME=1.4.1>1.4.1 Creating a TixComboBox Widget</H3>
<p><blockquote><a name=1-9>
<blockquote><pre>
tixComboBox .c -label "Animal:" -editable true
.c insert end cat
.c insert end dog
library/ComboBox.tcl view on Meta::CPAN
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: ComboBox.tcl,v 1.9 2008/02/28 22:39:13 hobbs Exp $
#
# tixCombobox --
#
# A combobox widget is basically a listbox widget with an entry
# widget.
#
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
library/ComboBox.tcl view on Meta::CPAN
pack $data(w:slistbox) -expand yes -fill both
}
proc tixComboBox:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
# (1) Fix the bindings for the combobox
#
bindtags $w [list $w TixComboBox [winfo toplevel $w] all]
# (2) The entry subwidget
#
tixSetMegaWidget $data(w:entry) $w TixComboBox
bindtags $data(w:entry) [list $data(w:entry) Entry TixComboEntry\
TixComboWid [winfo toplevel $data(w:entry)] all]
library/ComboBox.tcl view on Meta::CPAN
upvar #0 $w data
if {$data(state) eq "n0"} {
tixComboBox:GoState n1 $w
}
}
#----------------------------------------------------------------------
# General keyboard event
# returns 1 if the combobox is in some special state and the Escape key
# shouldn't be handled by the toplevel bind tag. As a result, when a combobox
# is popped up in a dialog box, Escape will popdown the combo. If the combo
# is not popped up, Escape will invoke the toplevel bindtag (which can
# pop down the dialog box)
#
proc tixComboBox:EscKey {w} {
upvar #0 $w data
if {$data(-state) eq "disabled"} { return 0 }
switch -exact -- $data(state) {
library/EFileBox.tcl view on Meta::CPAN
# MISC Methods
#----------------------------------------------------------------------
proc tixExFileSelectBox:SetShowHidden {w} {
upvar #0 $w data
$data(w:dirlist) config -showhidden $data(-showhidden)
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
}
# User activates the dir combobox
#
#
proc tixExFileSelectBox:Cmd-DirCombo {w args} {
upvar #0 $w data
set dir [tixEvent flag V]
set dir [tixFSExternal $dir]
if {![file isdirectory $dir]} {
return
}
library/FileCbx.tcl view on Meta::CPAN
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FileCbx.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# tixFileCombobox --
#
# A combobox widget for entering file names, directory names, file
# patterns, etc.
#
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
man/tixComboBox.n view on Meta::CPAN
'\"----------BEGIN
.OP \-selection selection Selection
This option stores the temporary selection. When the user types in a
text string inside the entry widget, that string is considered as a
temporary input and is stored inside the \fB\-selection\fR option. The
\fB\-value\fR option is updated only when the user presses the return
key.
'\"
'\"----------BEGIN
.OP \-selectmode selectMode SelectMode
Specifies the how the combobox responds to the mouse button events in
the listbox subwidget; can eithet be \fB"browse"\fR or
\fB"immediate"\fR. The default \fB\-selectmode\fR is "browse". See the
\fBBINDINGS\fR section below.
'\"----------END
'\"----------BEGIN
.OP \-state state State
Specifies the whether the ComboBox is normal or disabled.
Only the values "normal" and "disabled" are recognized.
'\"----------END
'\"
tests/general/cmderror.tcl view on Meta::CPAN
if ![auto_load tixCmdErrorHandler] {
TestAbort "toolkit error: procedure \"tixCmdErrorHandler\" not implemented"
}
}
rename tixCmdErrorHandler _default_tixCmdErrorHandler
proc tixCmdErrorHandler {msg} {
global cmdHandlerCalled
set cmdHandlerCalled 1
}
# We cause an error to occur in the -command handler of the combobox
# widget. Such an error shouldn't cause the operation to fail.
# See the programmer's documentation of tixCmdErrorHandler for details.
#
catch {
tixComboBox .c -command CmdNotFound
.c invoke
set cmdNotFailed 1
}
Assert {[info exists cmdNotFailed]}
Assert {[info exists cmdHandlerCalled]}
tests/general/combobox.tcl view on Meta::CPAN
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: combobox.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
#
# combobox.tcl --
#
# Tests the ComboBox widget.
#
# Copyright (c) 1996, Expert Interface Technologies
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
proc About {} {
tests/general/event0.tcl view on Meta::CPAN
}
TestBlock event0-1.5 {Clicking a button} {
button .b -command "set foo 1"
pack .b; update
Click .b
Assert {$foo == 1}
}
TestBlock event0-1.6 {Drag and selecting a combobox} {
tixComboBox .c
.c insert end 10
.c insert end 10
.c insert end 10
.c insert end 10
.c insert end 10
pack .c; update
HoldDown [.c subwidget arrow]
Drag [.c subwidget listbox] 10 10
tests/general/files view on Meta::CPAN
oop.tcl
optmenu.tcl
select.tcl
slistbox.tcl
var1.tcl
NoteBook.tcl
mwm.tcl
cmderror.tcl
dirbox.tcl
filebox.tcl
combobox.tcl
samples.tcl
draw.tcl