Aldo,

Well done. I thought I saw one of your demo programs doing something
similiar.

Thanks again,

Phil Larson

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Aldo Calpini
> Sent: Monday, March 01, 1999 1:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [perl-win32-gui] single row RichEdit (was: Tabs)
>
>
> Philip A. Larson wrote:
> >Thanks for the response.  I'm afraid I don't have any experience with
> dialog
> >boxes. I sure don't like the sound of it though.  Is there a way
> to get the
> >RichEdit class to limit its editing to one row?
>
> there is, but it's not at all for the faint of heart :-)
> you can use the (mostly experimental) widget subclassing mechanism of
> Win32::GUI, and create a new customary class for RichEdit controls.
> this new class enables some additional events to be triggered, one of
> them being KeyPress, which gets as argument the ASCII code of the key
> being pressed in the RichEdit. then, your event simply returns 0
> (which cancels the operation) if the key pressed is ASCII 13 (enter),
> 1 (continue normally) otherwise.
> it's a little tricky, but now you have your single row RichEdit ;-)
> attached there's a small sample that shows this technique at work.
> FYI, the additional events triggered for "subclassed" RichEdit are:
>     LButtonDown
>     LButtonUp
>     RButtonDown
>     RButtonUp
>     KeyPress
> once again, this feature is *very* experimental; of course, comments
> and hints will be as always very appreciated...
>
> bye,
> Aldo Calpini
> <[EMAIL PROTECTED]>
>
>


Reply via email to