Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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:

$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.

In reply to Win32::GUI Bitmaps on buttons? by HaB

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2022-01-25 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (66 votes). Check out past polls.

    Notices?