From: Peter E. <Pet...@at...> - 2002-05-17 18:30:06
|
There is an 'accelerator' method which does what I think you want but I've never been able to make it work. You can fake some of it if the keystroke has an associated number value. > -----Original Message----- > From: ma...@mm... [mailto:ma...@mm...] > Sent: Thursday, May 16, 2002 20:11 > To: per...@li... > Subject: [perl-win32-gui-users] keystrokes > > > hi. is there any way of associating a keystroke with > something, like alt+s > to bring up a settings window? > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download > mirrors. We supply > the hardware. You get the recognition. Email Us: > ban...@so... > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > |
From: <Kev...@al...> - 2002-05-18 16:40:22
|
Mark, I think something like the example at the below used to work but it doesn't seem to work any more on my system. Aldo's PRIDE example had something like this in it but this doesn't work now on my system either (it only worked if I commented out the " -class => $EditorClass," line from the definition of the RichEdit control). Hopefully you'll have better luck than me getting this to work. Cheers, Kev. use Win32::GUI; $Win = new Win32::GUI::Window( -left => 341, -top => 218, -width => 300, -height => 300, -name => "Win", -text => "A Window" ); $Win->Show(); $Win->AddRichEdit( -text => "", -name => "MyEdit", -multiline => 1, -left => 9, -top => 14, -width => 271, -height => 248, -addexstyle => WS_EX_CLIENTEDGE, -addstyle => WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_LEFT | ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL, ); Win32::GUI::Dialog(); sub MyEdit_KeyPress { my $key = shift; print "Key: $key\n"; # do what ever action you want depending on the value of key } sub MyEdit_Change { print "Richedit changed\n"; } sub Win_Terminate { return -1; } |---------+------------------------------------------------> | | "Mark Di Nicola" | | | <amo...@ih...> | | | Sent by: | | | per...@li...ur| | | ceforge.net | | | | | | | | | 18/05/2002 01:51 | | | | |---------+------------------------------------------------> >----------------------------------------------------------------------------------------------| | | | To: "Peter Eisengrein" <Pet...@at...>, <ma...@mm...>, | | <per...@li...> | | cc: | | Subject: Re: [perl-win32-gui-users] keystrokes | >----------------------------------------------------------------------------------------------| thanks. have you got any examples on how its supposed to be done? ----- Original Message ----- From: Peter Eisengrein To: 'ma...@mm...' ; per...@li... Sent: Saturday, May 18, 2002 4:29 AM Subject: RE: [perl-win32-gui-users] keystrokes There is an 'accelerator' method which does what I think you want but I've never been able to make it work. You can fake some of it if the keystroke has an associated number value. > -----Original Message----- > From: ma...@mm... [mailto:ma...@mm...] > Sent: Thursday, May 16, 2002 20:11 > To: per...@li... > Subject: [perl-win32-gui-users] keystrokes > > > hi. is there any way of associating a keystroke with > something, like alt+s > to bring up a settings window? > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download > mirrors. We supply > the hardware. You get the recognition. Email Us: > ban...@so... > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > |
From: Mark Di N. <amo...@ih...> - 2002-05-18 22:15:08
|
i've dug through the documentation and found win32::gui::accelerator and win32::gui::acceleratortable and -accel -accelerators and -acceleratortable and i've tried a number of combinations of these but it doesn't seem to work. are these deprecated or are they supposed to work? ----- Original Message ----- From: <Kev...@al...> To: "Mark Di Nicola" <amo...@ih...> Cc: <ma...@mm...>; <per...@li...>; <per...@li...>; "Peter Eisengrein" <Pet...@at...> Sent: Sunday, May 19, 2002 2:34 AM Subject: Re: [perl-win32-gui-users] keystrokes > > Mark, > > I think something like the example at the below used to work but it doesn't > seem to work any more on my system. Aldo's PRIDE example had something > like this in it but this doesn't work now on my system either (it only > worked if I commented out the " -class => $EditorClass," line from the > definition of the RichEdit control). > > Hopefully you'll have better luck than me getting this to work. > > Cheers, > > Kev. > > use Win32::GUI; > > $Win = new Win32::GUI::Window( > -left => 341, > -top => 218, > -width => 300, > -height => 300, > -name => "Win", > -text => "A Window" > ); > > $Win->Show(); > > $Win->AddRichEdit( > -text => "", > -name => "MyEdit", > -multiline => 1, > -left => 9, > -top => 14, > -width => 271, > -height => 248, > -addexstyle => WS_EX_CLIENTEDGE, > -addstyle => WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL > | ES_LEFT | ES_MULTILINE | ES_AUTOHSCROLL | > ES_AUTOVSCROLL, > ); > > Win32::GUI::Dialog(); > > sub MyEdit_KeyPress { > my $key = shift; > print "Key: $key\n"; > # do what ever action you want depending on the value of key > } > > sub MyEdit_Change { > print "Richedit changed\n"; > } > > sub Win_Terminate { > return -1; > } > > > |---------+------------------------------------------------> > | | "Mark Di Nicola" | > | | <amo...@ih...> | > | | Sent by: | > | | per...@li...ur| > | | ceforge.net | > | | | > | | | > | | 18/05/2002 01:51 | > | | | > |---------+------------------------------------------------> > >--------------------------------------------------------------------------- -------------------| > | | > | To: "Peter Eisengrein" <Pet...@at...>, <ma...@mm...>, | > | <per...@li...> | > | cc: | > | Subject: Re: [perl-win32-gui-users] keystrokes | > >--------------------------------------------------------------------------- -------------------| > > > > > > thanks. have you got any examples on how its supposed to be done? > ----- Original Message ----- > From: Peter Eisengrein > To: 'ma...@mm...' ; per...@li... > Sent: Saturday, May 18, 2002 4:29 AM > Subject: RE: [perl-win32-gui-users] keystrokes > > There is an 'accelerator' method which does what I think you want but I've > never been able to make it work. You can fake some of it if the keystroke > has an associated number value. > > > > -----Original Message----- > > From: ma...@mm... [mailto:ma...@mm...] > > Sent: Thursday, May 16, 2002 20:11 > > To: per...@li... > > Subject: [perl-win32-gui-users] keystrokes > > > > > > hi. is there any way of associating a keystroke with > > something, like alt+s > > to bring up a settings window? > > > > > > _______________________________________________________________ > > > > Have big pipes? SourceForge.net is looking for download > > mirrors. We supply > > the hardware. You get the recognition. Email Us: > > ban...@so... > > _______________________________________________ > > Perl-Win32-GUI-Users mailing list > > Per...@li... > > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > > > > > > > _______________________________________________________________ > Hundreds of nodes, one monster rendering program. > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > |
From: Mark Di N. <amo...@ih...> - 2002-05-18 00:52:28
|
RE: [perl-win32-gui-users] keystrokesthanks. have you got any examples = on how its supposed to be done? ----- Original Message -----=20 From: Peter Eisengrein=20 To: 'ma...@mm...' ; per...@li...=20 Sent: Saturday, May 18, 2002 4:29 AM Subject: RE: [perl-win32-gui-users] keystrokes There is an 'accelerator' method which does what I think you want but = I've never been able to make it work. You can fake some of it if the = keystroke has an associated number value. > -----Original Message-----=20 > From: ma...@mm... [mailto:ma...@mm...]=20 > Sent: Thursday, May 16, 2002 20:11=20 > To: per...@li...=20 > Subject: [perl-win32-gui-users] keystrokes=20 >=20 >=20 > hi. is there any way of associating a keystroke with=20 > something, like alt+s=20 > to bring up a settings window?=20 >=20 >=20 > _______________________________________________________________=20 >=20 > Have big pipes? SourceForge.net is looking for download=20 > mirrors. We supply=20 > the hardware. You get the recognition. Email Us:=20 > ban...@so...=20 > _______________________________________________=20 > Perl-Win32-GUI-Users mailing list=20 > Per...@li...=20 > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users=20 >=20 |