Johan Lindstrom wrote:
> A weird thing:
>
> According to the docs, you can attach an -imagelist to a TabStrip, and then 
> specify the image index when you add a Tab.
>
> But the sample app for TabStrip attaches an ImageList and specifies 
> _Bitmap_ objects.

not quite. the sample (tabstrip.pl in the samples directory from the
source distribution) actually uses indexes from the ImageList.

    my $IL = new GUI::ImageList(16, 16, 8, 3, 10);
    my $IMG_ONE   = $IL->Add("one.bmp");

the ImageList::Add function returns the index of the added image.

    $W->Tab->InsertItem(
        -text => "First",
        -image => $IMG_ONE,
    );

and here we use that index for the TabStrip.
    
> According to the XS code (just a brief look), it should work like the docs 
> say, and according to the API, the ImageList index is the only way to go.
>
> When I try to do the "right" thing (with image indexes), it doesn't work.

the problem is probably somewhere else... :-)


cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;



Reply via email to