in reply to Re^3: Perl::Tk and cursor in Menubutton
in thread Perl::Tk and cursor in Menubutton

)))
MS)))
It's free. Yes. Free for use...
If I correct some code or use it in my software with corrections, I must tell about this software owner and publicate my source code of new version...
As I know, this module many years have not support... May be I thinking wrong...
This is first.

I want for my program less dependences...
May be in future all peoples can get new version of Tk module and my module may be have bad compatability with main procedures. I will have not in future headache with this...
If I choose correct code way I must track on each system version of Tk and its compatability with my module...
  • Comment on Re^4: Perl::Tk and cursor in Menubutton

Replies are listed 'Best First'.
Re^5: Perl::Tk and cursor in Menubutton
by zentara (Cardinal) on Oct 21, 2010 at 15:42 UTC
    I must apologize a bit to you. The preferred way to modify a module, for your own use, is to use a Derived widget. But as I experimented with making a Derived Menubutton widget, many unexpected behaviors popped up. I finally resorted to trying a local Tk directory containing a copy of Menubutton.pm . Then even with
    use strict; use lib '.'; BEGIN{ unshift @INC, '.';} use Tk; print "@INC\n"; .....
    It would find the system installed module, instead of my copy.

    I did manage to get a package MyMenuButton to load error free, but the menubutton would not appear in the $mw->menu for some reason.

    Here is as far as I care to take it. It works as a package, as long as you place the Derived MenuButton in the $mw, instead of the $mw->menu(). I do not know why it won't work from the menu. I changed the cursor to a pencil.

    So this would be perfectly acceptable as far as license and distribution goes. You can do some more cursor modifications in the Enter and Leave subs if you desire.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
      Yes!
      This is great!
      Thank you very much for your work...
      This is will be very usefull for me in for this task and may be help me with another module...

      I writing Drag-N-Drop Genealogy Editor.
      Родовід(Descent)
      At monday (I mean) I post new version with html reporting as descent site(www.mishchenko.tk example).
      But code in this software very wet and stupid at now.
      Now I create functionality and when I create it I must begin optimise code for better and better...
        I insert code in my program and all work fine.
        But I must add option -highlightbackground to each MeMenuButton because if I use option -state='active' in default mode will set wrong very light gray color.
        Big thanks for you support for me...
Re^5: Perl::Tk and cursor in Menubutton
by kcott (Archbishop) on Oct 21, 2010 at 05:29 UTC

    I presented two caveats at the end of the code. The first one addresses the compatibility issue you allude to.

    -- Ken