OK, let me re-post another of my postings that I have re-posted before ... not your fault, as I said, you could not have found that in the archive.
Two things: a) if you use classes, you get some mouse-related events (see below). NOT Right_Click, that only comes with some controls. But you can use RButtonDown or ~Up (or only Up when there was a Down on the same control, to make sure it wasn't a RightButtonDrag kind of thing) b) for some events not otherwise decoded, you might get an anonymous event, e.g. sub MyButton_Anonymous { print "surprise! $_[0]\n"; } with the first parameter being the message ID (you know all those by heart, right?) and additional parameters depending on the weather forecast. c) (OK, I meant three things, not two :-)) if the class-thingy does not work for the window itself, just create a blank label as your first control, the size of the window - or even larger, like the size of the desktop, in case somebody resizes your window. Use that label to intercept mouse clicks on the window. ... quote ... for quite a number of new events, you have to use classes (see below). Exactly what events which class gives you should be documented somewhere ... maybe around here ... or was it there ... erm ... I'm sure I had it l8ly ... :-/ Okay, if you dwell into gui.xs, around line 4100 you can see which classes there are: Button, Listbox, TabStrip, RichEdit, Graphic, InteractiveGraphic, Splitter and SplitterH. I don't know too much about it, but I vaguely remember that if you use Graphic or InteractiveGraphic, you have to provide a paint method, which is probably more than you want to do. The Splitter classes also might not be too useful. If you search the xs file for "msgloop" and look at the other classes, you will find that "button" and "listbox" give you MouseMove, whereas RichEdit gives you MouseMove, LButtonDown, LButtonUp, RButtonDown and RButtonUp. There's no restriction to not using a richedit class with buttons, I tried that and it works just fine. Here's how: new Win32::GUI::Class ( -name => '_Button', # -widget => 'Button', # only gives you MouseMove -widget => 'RichEdit', # gives you all five a.m. events -extends => 'Button', # which control type you're gonna use ); $Main->AddButton # could be most anything ( -name => 'Belly', -text => 'Clickme', -class => '_Button', ); sub Belly_MouseMove # now we're talking { print join (', ', @_), "\n"; # you even get the position } > -----Original Message----- > From: Marcus [mailto:[EMAIL PROTECTED] > Sent: Friday, November 30, 2001 11:08 > To: perl-win32-gui-users@lists.sourceforge.net > Subject: RE: [perl-win32-gui-users] Right-Click, Tooltips > > > On 30.11.01 at 09:51 Piske, Harald wrote: > >Methinks, tooltips is a functionality inherent in GUI ... somewhere > ... > maybe here ... or under there ... > > It's mentioned, but afaik not implemented yet. > > ># get right-click in listview > >sub DataView_RightClick { > > my($X, $Y) = Win32::GUI::GetCursorPos(); > > How do you get the _RightClick event for the whole window? > That is the crux of the biscuit (or the apostrophe :-) ). > > It is not actually documented, even for ListView. I don't use a > ListView at all. What we need is a general RightClick event for > windows, and for some widgets. For example, if you made an editor, > you'd want one for the editing/typing area, i.e. the RichEdit widget. > How else do you create the standard (and expected) > Cut/Copy/Paste menu? > > Marcus > > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >