in reply to Change the Behaviour of a Button in Tk::Dialog

Hello choroba,

I have never used Tk, but I found Tk::Button. Is this something that you are looking for?

You can find an example here: Masterin Perl/Tk (Chapter 2. Geometry Management).

Update: Or maybe (perl/tk changing button commands).

Update2: From the documentation of (Tk::Dialog):

When it's time to use a dialog, invoke the Show method on a dialog object; the method then displays the dialog, waits for a button to be invoked, and returns the text label of the selected button..

Most likely this could the work for you.

Hope this helps.

Seeking for Perl wisdom...on the process of learning...not there...yet!

16 May 2017 Athanasius Fixed link to Mastering Perl/Tk

Replies are listed 'Best First'.
Re^2: Change the Behaviour of a Button in Tk::Dialog
by choroba (Cardinal) on May 15, 2017 at 15:08 UTC
    I know Tk::Button . The problem is that adding Buttons to a Dialog via $dialog->Button(-text=>'Press me!')->pack; adds them to a different part of the dialog window than the buttons listed in the constructor. I need access to the latter ones.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,