Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^8: Insert checkbutton into MListbox

by ghosh123 (Monk)
on Feb 07, 2012 at 09:00 UTC ( #952231=note: print w/ replies, xml ) Need Help??


in reply to Re^7: Insert checkbutton into MListbox
in thread Insert checkbutton into MListbox

Thanks a lot. Tihs is exactly what I wanted.


Comment on Re^8: Insert checkbutton into MListbox
Re^9: Insert checkbutton into MListbox
by ghosh123 (Monk) on Feb 09, 2012 at 09:17 UTC

    Hello, I am running into a small problem. In the end of your script if I print the %is_selected hash,I can get which all items are selected/deselected. Problem is when I am embedding your code in my module. Supoose I have a module(test.pm) which has a method InitDialog(). I am invoking InitDialog from some script by a test.pm object. Now this how I am embedding your code in test.pm. Here I am using Notebook because I need this textWidget-chkbtn-upDwn structure for different display style.

    package test; sub new { ## something } sub InitDialog { #something something my $book = $frame->Notebook->pack ; foreach my $type qw(pageone pagetwo pagethree) { $page = $book->add("$type",-label => $type); $text = $page->Scrolled('Text',-scrollbars => 'e', + -width => ($item_width+15), -background => '#efefe +f' )->pack; $text->tagConfigure('item', %attr_item); &build($text); } while(my ($k,$v) = each(%is_selected)) { print "$k -> $v \n"; } } sub build { # your same build subrtn # only difference is the passed $text argument is held # in a variable. The rest is same # And $text is passed to move as well } sub move { ## Same code &build($text); }

    Now when in sub OnInitDialog I am printing the has key-value, I am not getting any value for the has keys. It is empty. What is going wrong ??? Please help.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://952231]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-12-22 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (121 votes), past polls