summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--library/tkfbox.tcl18
2 files changed, 9 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 8667d79..58c613d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-06 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * library/tkfbox.tcl (::tk::dialog::file::Create): use label
+ instead of button for "File of type", as it properly handles
+ -state disabled now.
+
2004-09-06 Pat Thoyts <patthoyts@users.sourceforge.net>
* win/makefile.vc: Set TK_LIBRARY when execing Tk apps (test,
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index ae03387..aa833ff 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.46 2004/08/11 22:22:02 dkf Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.47 2004/09/06 23:22:14 hobbs Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -1055,20 +1055,8 @@ static char updir_bits[] = {
# Make the file types bits only if this is a File Dialog
if { [string equal $class TkFDialog] } {
- # The "File of types:" label needs to be grayed-out when
- # -filetypes are not specified. The label widget does not support
- # grayed-out text on monochrome displays. Therefore, we have to
- # use a button widget to emulate a label widget (by setting its
- # bindtags)
-
- set data(typeMenuLab) [::tk::AmpWidget button $f2.lab2 \
- -text $fTypeCaption -anchor e -bd [$f2.lab cget -bd] \
- -highlightthickness [$f2.lab cget -highlightthickness] \
- -relief [$f2.lab cget -relief] \
- -padx [$f2.lab cget -padx] \
- -pady [$f2.lab cget -pady]]
- bindtags $data(typeMenuLab) [list $data(typeMenuLab) Label \
- [winfo toplevel $data(typeMenuLab)] all]
+ set data(typeMenuLab) [::tk::AmpWidget label $f2.lab2 \
+ -text $fTypeCaption -anchor e -pady [$f2.lab cget -pady]]
set data(typeMenuBtn) [menubutton $f2.menu -indicatoron 1 \
-menu $f2.menu.m]
set data(typeMenu) [menu $data(typeMenuBtn).m -tearoff 0]