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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |