I have the below 12 outer ball shapes forming a ring shape, and I can only bind a mouse click to the $refitem one(one of the balls in the ring of balls as it were)... can anyone show me how to bind to one of the balls created by the for loop?
# # bit of code # # outer marker ball one my $refitem = $zinc->add('arc',$centergroup2, [ [10,20], [20,30] ], -filled => 1, -fillcolor => $refgrad, ## $refgrad -linewidth => 0, -priority => 100 ); # make/clone 11/12 more of the above... and form the ring shape for (1..11){ my $relement = $zinc->clone($refitem); $zinc->rotate($relement,.53*$_); } $zinc->bind($refitem, '<1>', \&ro6); # this is the one that w +orks when I click on it #$zinc->bind($relement[1], '<1>', \&ro6b); # Looking for this part
Don't know the right wording as I'm not a programmer... put this makes abit of sence to me: If I could make an array... made up of each of the 11/12 balls created in the for loop's names, then the "#$zinc->bind($varname1, '<1>', \&ro6b);" bit as it were, might work. # Am on Windows XP Home # With ActiveState ActivePerl 5.8.7 Build 815 # Also use EnginSite Perl Editor LITE

In reply to for loops by Anonymous Monk

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.