Subject: | Trivial Problem with Editable List |
In v1.10 of the Tk-JComboBox module for ActiveState Perl (under
WinXP), there seems to be a difference in the way that an editable
list is displayed.
Using the attached jjgbug.pl program, with v0.02 installed, the combo
box would display the text field with a background that was the system
(window background) default. In v1.10, the background is *always*
white, which looks weird on my system.
In Tk\JComboBox.pm, around line 372, there is a portion of code used
when an editable list is defined, viz:
if ($mode eq MODE_EDITABLE) {
$entry = $frame->Entry(
-highlightthickness => 0,
-borderwidth => 1,
-background => 'white',
-insertwidth => 1,
-relief => 'flat',
-validatecommand => [$cw => 'ValidateCommand']
);
$cw->Advertise(Entry => $entry);
$cw->Advertise(ED_Entry => $entry);
}
This block of code is significantly expanded from v0.02... but it
means that the editable field is always white (by default).
Is this a required behaviour or is it a bug?
John Gibney
Subject: | jjgbug.pl |
# jjgbug.pl - ActiveState Perl, Build 813
# Windows XP 5.1
#
# Bug is that the text field portion of the combobox
# is always white and ignores system (windows background)
# default
#
use strict;
use Tk;
use Tk::JComboBox;
my @Type = ( 'Apple', 'Orange', 'Lemon', 'Peach' );
my $mw = MainWindow->new;
$mw->geometry('100x100+100+100');
my $jcb = $mw->JComboBox(
-relief => 'sunken',
-mode => 'editable',
-choices => \@Type,
)->pack(-anchor => 'w');
MainLoop;