From: Jez W. <je...@je...> - 2004-02-18 15:00:46
|
Cool. I'll have a play when I can see the changes. ----- Original Message -----=20 From: "Stephen Pick" <Ste...@uc...> To: "Jez White" <je...@je...>; "Win32 GUI Hackers (E-mail)= " <per...@li...> Sent: Wednesday, February 18, 2004 12:29 PM Subject: Addition: [perl-win32-gui-hackers] CVS update: Toolbars To enable tooltips you need to do something like this: $TB->SetStyle(TBSTYLE_FLAT|TBSTYLE_TRANSPARENT|1|TBSTYLE_LIST|TBSTYLE_TOO= LTI PS); $TB->SetExtendedStyle(0x00000008); 0x00000008 is the TBSTYLE_EX_MIXEDBUTTONS style which is only compiled in= if the constant _WIN32_IE is greater or equal to 0x0501. You can set this in GUI.h, and I see no reason for it to remain forced at 0x0401 as this is *OLD*, so I've updated it to 0x0501 as that basically means "IE 5 install= ed" which everyone in their right mind has. CVS committed. Steve > -----Original Message----- > From: per...@li... > [mailto:per...@li...]On > Behalf Of > Jez White > Sent: 18 February 2004 10:03 > To: Steve Pick; Win32 GUI Hackers (E-mail) > Subject: Re: [perl-win32-gui-hackers] CVS update: Toolbars > > > Hi, > > I've had a play and it seems ok - although I'm having a few > problems with > some of the styles - but this could be me:) > > The example below creates a toolbar with a few buttons (run > in the samples > folder for it to pick up the bitmaps) which are added via image lists. > If I use the SetStyle method (with any style) the toolbar > ends up at the > bottem of the window. I've yet to get any functionality working with > SetExtendedStyle (I was trying to get tooltips working with > the toolbar > using the text from the buttons). > > Just me? > > Cheers, > > jez. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > use Win32::GUI; > > $W =3D new Win32::GUI::Window( > -title =3D> "Win32::GUI::Toolbar test", > -left =3D> 100, > -top =3D> 100, > -width =3D> 500, > -height =3D> 400, > -name =3D> "Window", > ); > > $B1 =3D new Win32::GUI::Bitmap("one.bmp"); > $B2 =3D new Win32::GUI::Bitmap("two.bmp"); > $B3 =3D new Win32::GUI::Bitmap("three.bmp"); > $IL =3D new Win32::GUI::ImageList(16, 16, 0, 3, 10); > $IL->Add($B1, 0); > $IL->Add($B2, 0); > $IL->Add($B3, 0); > > $TB =3D $W->AddToolbar( > -left =3D> 0, > -top =3D> 0, > -width =3D> 300, > -height =3D> 100, > -name =3D> "Toolbar", > -addstyle =3D> 0x0800, > ); > $TB->SetImageList($IL); > #$TB->SetStyle(TBSTYLE_FLAT|TBSTYLE_TRANSPARENT); > #$TB->SetExtendedStyle(TBSTYLE_EX_MIXEDBUTTONS|TBSTYLE_EX_DRAW > DDARROWS); > $Bh1 =3D new Win32::GUI::Bitmap("three.bmp"); > $Bh2 =3D new Win32::GUI::Bitmap("one.bmp"); > $Bh3 =3D new Win32::GUI::Bitmap("two.bmp"); > $ILhot =3D new Win32::GUI::ImageList(16, 16, 0, 3, 10); > $ILhot->Add($Bh1, 0); > $ILhot->Add($Bh2, 0); > $ILhot->Add($Bh3, 0); > $TB->SetHotImageList($ILhot); > $TB->AddButtons( > 4, > 0, 1, 4, 0, 0, > 1, 2, 4, 0, 1, > 0, 0, 0, TBSTYLE_SEP, 0, > 2, 3, 4, 0, 2, > ); > $TB->AddString("One"); > $TB->AddString("Two"); > $TB->AddString("Three"); > > $W->Show; > > Win32::GUI::Dialog(); > > > sub Window_Terminate { > return -1; > } > > sub Window_Resize { > $TB->Resize($W->ScaleWidth-10, 100); > } > > sub Toolbar_ButtonClick { > my($button) =3D @_; > print "Toolbar: clicked button $button\n"; > } > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick > _______________________________________________ > Perl-Win32-GUI-Hackers mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers > ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dick _______________________________________________ Perl-Win32-GUI-Hackers mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers |