Tk-DKW

 view release on metacpan or  search on metacpan

Tk/ComboEntry.pm  view on Meta::CPAN

package Tk::ComboEntry;

use Tk::Listbox;
use Tk::Entry;
use Tk;

use base qw (Tk::Derived Tk::Frame);
use vars qw ($VERSION);
use strict;

$VERSION = '0.03';

*listheight = \&Tk::ComboEntry::ListHeight;
*state = \&Tk::ComboEntry::SelectionState;
*itemlist = \&Tk::ComboEntry::SelectionList;
*list = \&Tk::ComboEntry::SelectionList;
*listfont = \&Tk::ComboEntry::ListFont;
*invoke = \&Tk::ComboEntry::Invoke;

Tk::Widget->Construct ('ComboEntry');

sub ClassInit
   {
    $_[1]->bind ($_[0], '<Configure>', 'Configure');
    $_[1]->bind ($_[0], '<Map>', 'Configure');
    return $_[0];
   }

sub Populate
   {
    my $this = shift;

    eval
       {
        my $l_Bitmask = pack
           (
            "b8"x8,
            "..........",
            ".11111111.",
            "..111111..",
            "..111111..",
            "...1111...",
            "...1111...",
            "....11....",
            "....11....",
           );

        $this->toplevel->DefineBitmap
           (
            'downtriangle' => 8, 8, $l_Bitmask
           );
       };

    my $l_Entry = $this->Component
       (
        'Entry' => 'Entry',
        '-highlightthickness' => 1,
        '-borderwidth' => 0,
        '-relief' => 'flat',
        '-takefocus' => 1,
        '-width' => 0,
       );

    my $l_Button = $this->Component
       (
        'Button' => 'Button',
        '-bitmap' => 'downtriangle',



( run in 1.208 second using v1.01-cache-2.11-cpan-df04353d9ac )