See Re: A TableMatrix row selection question :)

1. Where do I find what are all the fields that a Perl/Tk programmer can access from an XEvent object and what do those fields stand for?

The source :) The internet 1 2 :) Tk::WidgetDump

The source..

:) So as you can see you need to read Tk::event/https://metacpan.org/pod/Tk::bind#BINDING-CALLBACKS-AND-SUBSTITUTIONS ;) and use Tk::WidgetDump to see the available/mapped bindings and things of that nature :) play with this

#!/usr/bin/perl -- use strict; use warnings; use Tk; my $mw = tkinit(); my $mb = $mw->Button()->pack; $mb->configure( '-command' => sub { ## closure here print join "\n", $Tk::event, $mb->XEvent, $mb, $Tk::widget, '', ;;;;; }, ); $mw->WidgetDump; $mw->MainLoop(); __END__ Assuming 'require Tk::WidgetDump;' at - line 20. XEvent=SCALAR(0x113de0c) XEvent=SCALAR(0x113de0c) Tk::Button=HASH(0xf44d9c) Tk::Button=HASH(0xf44d9c)

2. In the selectionSet and selectionIncludes methods the above specified thread used the values: '@' . $Ev->x . "," . $Ev->y what does this @ and the full expression stand for. I could not find anything in the perldocs for TableMatrix (and other widgets like TList decendants which also have these methods).

Read it out loud?

$w->activate('@' . $Ev->x.",".$Ev->y); $w->BeginExtend( $w->index('@' . $Ev->x.",".$Ev->y));

on $widget call activate with "at" x coordinate, y coordinate

on $widget call index with "at" x coordinate, y coordinate

:) So then you lookup methods activate/index to find out what the coordinates mean ... Tk::Text is chock full of coordinate stuff

As I'm still trying to learn Perl and Perl/Tk I had to spend few hours trying to look around but to no avail.

Why are you looking inside about this?

Tk tips :)

perl Tk help, RFC: Learning Perl/Tk, Perl/Tk: For Beginners, Re^3: Tkx Search for dialog box for text input , Re: TclTk interface with Perl code, is it possible? , Re^2: GUI toolkit+designer for the perl newbie , Re: Easier GUI, Re: Should I use Perl/TK?, Re^2: need a popup gui stdin, Tk Tree Tutorial ( http://www.rtapo.com/tutorials/tk_tree.html ), some Tkx tutorial links, Tutorial http://theoryx5.uwinnipeg.ca/perltk/ and http://www.perl.com/pub/1999/10/perltk/, http://perltk.org/, http://web.archive.org/web/20100310202528/http://theoryx5.uwinnipeg.ca/perltk/, How to RTFM Tk Tutorials


In reply to Re: A TableMatrix row selection question by Anonymous Monk
in thread A TableMatrix row selection question 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.