What would be relevant code?

You asked about buttons without telling us the context. You can use Perl to generate web pages, which can have buttons. You can use Perl to create a GUI based application using Tk. I think you get the point. Without understanding the context of what kind of button, it's difficult to understand how to help. Reverse the situation. If someone asked for help with a thingamajig, would you be able to offer help without knowing what the heck a thingamajig is?

Based on your reference to loft.gld (presumably the GUI Loft) and 'Win32::GUI::Dialog', I think it's safe to assume that you're asking about buttons using Win32::GUI and you're using the GUI Loft.

Ok, first I want to address using the GUI Loft. From personal experience, the code for the GUI Loft appears to use an older version of Win32::GUI than what is currently available. I primarily use the GUI Loft to help with sizing and location of each component and then use current documentation for the version of Win32::GUI that I'm using. It's still a useful tool, but keep in mind that it might be using deprecated syntax.

To answer your question about the button, I'm referring to the ActivePerl User Guide to look at the documents for version 1.06 of Win32::GUI. If you're using a different distribution of Perl, you should be able to read the documentation that was included when Win32::GUI was installed. I would offer a link to CPAN, but I can't find the link for the detailed information for the button object.

In your question, you asked about the Click event for the button object. For the functionality that you're looking for, I'd recommend looking into GotFocus, LostFocus and Push events. It sounds like the Push event may be what you're looking for.

Since you're not inclined to make it clear what module that you're using or providing sample code that shows the problem you're encountering, I'm not inclined to crank out code to test the events listed above for you after trying to read your mind and providing this very detailed reply. I'm not trying to be mean, but you might want to check out the links in roboticus' reply. If you follow those links and apply that to your posts, I'm 100% sure that people would be much more willing to offer assistance.


In reply to Re^3: Release Button in Click by dasgar
in thread Release Button in Click by tcopeck

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.