Tk Library Source Code

View Ticket
Login
Ticket UUID: 225308
Title: BWidget: tk8.4 breaks Entry widget state option
Type: Bug Version:
Submitter: stevel Created on: 2000-12-11 09:56:27
Subsystem: Assigned To: jenglish
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-06-30 06:17:20
Resolution: Fixed Closed By: jenglish
    Closed on: 2001-06-29 23:17:20
Description:
Tk8.4 introduced the -state normal/disabled options for the entry widget. These conflict with the implementation of -state in the BWidget Entry widget. The workaround is to
create the BWidget Entry widget and configure the state using a separate command. A better solution would be to modify BWidget to recognise Tk 8.4 or later and use the new entry widget features.
User Comments: jenglish added on 2001-06-30 06:17:20:
Logged In: YES 
user_id=68433

Fixed in entry.tcl r1.15

jenglish added on 2001-06-01 03:04:11:
Logged In: YES 
user_id=68433

OK, this has been fixed now.
Files changed:
entry.tcl : r1.14 -> r1.15
Tested under Tk 8.3 and Tk 8.4

jenglish added on 2001-06-01 02:13:35:
Logged In: YES 
user_id=68433


Re: patch [ #402776 ] BWidget: support for Tk8.4 entry
-state --

am taking a closer look.  One issue: it changes the
behaviour of the '-disabled'
state (a -disabled  BWidget::Entry can be programmatically
modified, 
whereas a -disabled Tk::entry cannot; I've backed that part
of the patch out.)

stevel added on 2001-05-29 05:24:48:
Logged In: YES 
user_id=2460

jenglish asked
> Probably not an ideal fix -- does anyone have any better
> ideas?

Not necessarily better, but I submitted a patch last year
that fixes the problem. 

See [ #402776 ] BWidget: support for Tk8.4 entry -state.

jenglish added on 2001-05-29 04:45:21:
Logged In: YES 
user_id=68433

One possible fix: Add '-disabledforeground' to the tkinclude
'remove' list
in entry.tcl:

    Widget::tkinclude Entry entry :cmd \
            remove [list -state -cursor -foreground
-textvariable -disabledforeground]

This avoids the problem under Tk 8.4, and is a no-op under
earlier Tk versions.

Probably not an ideal fix -- does anyone have any better
ideas?

Is it OK if I commit this change?