Tk Source Code

View Ticket
Login
Ticket UUID: 795717
Title: tk_getOpenFile foreground color
Type: Bug Version: obsolete: 8.4.4
Submitter: markgsaye Created on: 2003-08-27 00:50:55
Subsystem: 37. [tk_get*File] Assigned To: dkf
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-10-29 16:41:25
Resolution: Fixed Closed By: dkf
    Closed on: 2003-10-29 09:41:25
Description:
The tk_getOpenFile ignores foreground colors in the
option database. More precisely, canvas widgets do not
have a -foreground color option which could be used by
text items' -fill option.

Example:
% option add *Canvas.background black
% option add *foreground white
% tk_getOpenFile

now shows black text on a black background. Not very
helpful. Here's a small patch to tkfbox.tcl (8.4.4)
which remedies the situation:

> diff tkfbox.tcl tkfbox.tcl.0
242,245d241
<     set fg [option get $data(canvas) foreground
Foreground]
<     if { ![string length $fg] } { set fg black }
<     set data(fill) $fg
<
345d340
<     set fg [option get $data(canvas) foreground
Foreground]
350d344
<               -fill $data(fill) \
User Comments: dkf added on 2003-10-29 16:41:25:
Logged In: YES 
user_id=79902

Fixed in 8.4 Branch and HEAD