HaB has asked for the wisdom of the Perl Monks concerning the following question:
Hello...
Experiencing the pitfalls of working with a module that is still in beta, and that the author hasn't finished documenting yet. In Win32::GUI, I am trying to create a toolbar, with 5 buttons, each of which should have a picture on it. I am using the toolbar.pl sample script that comes with Win32::GUI as a guideline, but I don't see many differences aside from the number of buttons I'm adding, (5) as opposed to what the sample script adds. (3)
So what I'm wondering is...does anyone know proper syntax/arguments for getting a bitmap onto a button? The documentation for Toolbars is not there, and only one bitmap method is described for Bitmap objects. The rest are TBD. I'm using the following code:
I get the toolbar and the buttons, but they are blank, and henceforth not very useful. [; Also, any further help on what the args for AddButtons are used for would help immensely. I know the first arg is the number of buttons to add, and the 2nd column in each group of five is the number that's returned for the Click event. Everything else....*shrug* Anyone know what's up?
HaB
hword.
Experiencing the pitfalls of working with a module that is still in beta, and that the author hasn't finished documenting yet. In Win32::GUI, I am trying to create a toolbar, with 5 buttons, each of which should have a picture on it. I am using the toolbar.pl sample script that comes with Win32::GUI as a guideline, but I don't see many differences aside from the number of buttons I'm adding, (5) as opposed to what the sample script adds. (3)
So what I'm wondering is...does anyone know proper syntax/arguments for getting a bitmap onto a button? The documentation for Toolbars is not there, and only one bitmap method is described for Bitmap objects. The rest are TBD. I'm using the following code:
$main_toolbar = $main->AddToolbar( -left => 0, -top => 0, -width => $main->ScaleWidth-10, -height => 16, -name => "Toolbar" ); my $tb_bmp = Win32::GUI::Bitmap->new("c:\\devel\\adtserver_new\\toolba +r16.bmp"); $main_toolbar->SetBitmapSize(16,16); $main_toolbar->AddBitmap($tb_bmp, 5); $main_toolbar->AddButtons( 5, 0, 1, 4, 0, 0, 1, 2, 4, 0, 1, 2, 3, 4, 0, 2, 3, 4, 4, 0, 3, 4, 5, 4, 0, 4 );
I get the toolbar and the buttons, but they are blank, and henceforth not very useful. [; Also, any further help on what the args for AddButtons are used for would help immensely. I know the first arg is the number of buttons to add, and the 2nd column in each group of five is the number that's returned for the Click event. Everything else....*shrug* Anyone know what's up?
HaB
hword.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Win32::GUI Bitmaps on buttons?
by Shendal (Hermit) on Nov 21, 2000 at 19:47 UTC | |
by HaB (Sexton) on Nov 21, 2000 at 22:56 UTC | |
Re: Win32::GUI Bitmaps on buttons?
by the_slycer (Chaplain) on Nov 22, 2000 at 04:09 UTC |
Back to
Seekers of Perl Wisdom