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"                     |
|         |           <[EMAIL PROTECTED]>               |
|         |           Sent by:                             |
|         |           [EMAIL PROTECTED]|
|         |           ceforge.net                          |
|         |                                                |
|         |                                                |
|         |           18/05/2002 01:51                     |
|         |                                                |
|---------+------------------------------------------------>
  
>----------------------------------------------------------------------------------------------|
  |                                                                             
                 |
  |       To:       "Peter Eisengrein" <[EMAIL PROTECTED]>, <[EMAIL 
PROTECTED]>,           |
  |        <perl-win32-gui-users@lists.sourceforge.net>                         
                 |
  |       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: '[EMAIL PROTECTED]' ; perl-win32-gui-users@lists.sourceforge.net
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 16, 2002 20:11
>  To: perl-win32-gui-users@lists.sourceforge.net
> 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:
> [EMAIL PROTECTED]
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>





Reply via email to