Hi folks,

I have difficulties to set Tooltips for image buttons. My application is using 
XRC for the basic layout.
Therefore I thought I need to find the imagebutton and than apply the tooltip. 
Here is my code snippet.

#load the bitmap
my $bm = Wx::Bitmap->new("$resourcedir/" . $condition{$key}{'off'}, 
wxBITMAP_TYPE_PNG);

#assign it to the button
$frame->FindWindow($key)->SetBitmapLabel($bm);

# assign the tool tip
$frame->FindWindow($key)->SetTip($condition{$key}{'text'});             

To understand the code:
In the beginning I load a hash carring the image names and tool tips (text)  
my %condition = (
        'ID_BB_1' => {
                'name' => 'P2 Softproof UV',
                'text' => 'P2 Softproof 500lux UV',
                'cfg' => 'p2_softproofing_uv.cfg',
                'on' => 'monitor_uv_on.png',
                'off' => 'monitor_uv_off.png',
                'memory' => 'M3',
        },
…. more conditions


thx and regards
Alexander

Reply via email to