> I triede for eg. the DblClick() event like that > > sub Button_DblClick { > print "DblClick on Button.\n"; > return 1; > } > > But this doesn't work ... are this events not supportet yet?
Yes they are, thru the class. Note that you can have buttons extend the RichEdit widget and vice versa, which you might need because the Button widget only gives you the MouseMove event. See 2nd snippet below. The following is from my own posting back in may ... don't worry, you would not have found it in the archive, the search function seems 2b a placebo. <snip> <please hold while we transfer your inquiry to another reply> <snap> new Win32::GUI::Class ( -name => '_Button', -widget => 'Button', -extends => 'Button', ); $Main->AddButton ( -name => 'Belly', -text => 'Clickme', -class => '_Button', ); sub Belly_MouseMove { local ($button, $xpos, ypos) = @_; # print join (', ', @_), "\n"; } <cut> <and here is yet another exciting report on this amazing subject> <smack> 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.