greetings,
as this example shows the bitmap is loaded and correctly displayed, but not in
the menubar. even if i copy it from mit to icon it is displayed as icon but
not in menu.

there are some issues more. but this is most important to me now.
any idea?
thanks

use strict;
use warnings;

package PODokular;
use Wx ':everything';
use Wx::Event ':everything';
use base 'Wx::App';

sub OnInit {
        my $frame = Wx::Frame->new (undef, -1, 'PODokular', [50,50], [300, 
300]);
        my $panel = Wx::Panel->new( $frame );
        Wx::InitAllImageHandlers();
        my $ico = Wx::Icon->new( 'file_edit.xpm', wxBITMAP_TYPE_XPM );
        my $bmp = Wx::Bitmap->new( 'file_edit.xpm', wxBITMAP_TYPE_XPM );
        $frame->SetIcon( $ico );

        my $status = $frame->CreateStatusBar(1);
        $status->SetFieldsCount(2);                 # 2 felder hat die Leiste
        $status->SetStatusWidths( 100, -1 );        # -1 bedeuted nimm den Rest
        $frame->SetStatusBarPane(0);                # Menühilfe kommt hier an

        my $datei_menue = Wx::Menu->new();
        my $item = $datei_menue->Append(-1, "Laden\tCtrl+L", "laden");
        $item->SetBitmap( $bmp );
        my $menuezeile = Wx::MenuBar->new();
        $menuezeile->Append($datei_menue, 'Datei');
        $frame->SetMenuBar($menuezeile);

        EVT_MENU($frame, $item->GetId, sub { $status->SetStatusText( 'laden', 
1) } );

        $frame->Show(1);
        1;
}

package main;
PODokular->new()->MainLoop();

Reply via email to