1. RichEdit - Paint Event
This is a multi-part message in MIME format.
------=_NextPart_000_0053_01C4E2EC.E81B9EE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
RichEdit - Paint Event
Is anyone else having a problem with RichEdits turning grey and only printing
||||||||||||||| when you type after calling a paint event?
Anybody have an answer to the problem?
(Running on XP)
Alx
------=_NextPart_000_0053_01C4E2EC.E81B9EE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>RichEdit - Paint Event</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is anyone else having a problem with RichEdits
turning grey and only printing ||||||||||||||| when you type after calling a
paint event?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Anybody have an answer to the problem?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>(Running on XP)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Alx</FONT></DIV></BODY></HTML>
------=_NextPart_000_0053_01C4E2EC.E81B9EE0--
2. Re: RichEdit - Paint Event
- Posted by Brian Broker <bkb at cnw.com>
Dec 15, 2004
-
Last edited Dec 16, 2004
Alex Chamberlain wrote:
>
> This is a multi-part message in MIME format.
Please disable MIME and HTML when sending to the list. Use plain text only.
>
> Is anyone else having a problem with RichEdits turning grey and only printing
> |||||||||||||||
> when you type after calling a paint event?
>
> Anybody have an answer to the problem?
>
> (Running on XP)
>
> Alx
Do you have an example that exhibits this behavior?
-- Brian
3. Re: RichEdit - Paint Event
Problem program:
-- code generated by Win32Lib IDE v0.18.22
include Win32Lib.ew
without warning
----------------------------------------------------------------------------
----
-- Window Window1
global constant Window1 = createEx( Window, "Window1", 0, Default, Default,
400, 300, 0, 0 )
global constant StatusBar3 = createEx( StatusBar, "", Window1, 0, 0, 0, 0,
0, 0 )
global constant RichEdit2 = createEx( RichEdit, "", Window1, 5, 5, 385, 235,
w32or_all({ES_NOHIDESEL}), 0 )
---------------------------------------------------------
----------------------------------------------------------------------------
----
integer paintCount
paintCount = 0
----------------------------------------------------------------------------
----
procedure RichEdit2_onPaint (integer self, integer event, sequence
params)--params is ( int x1, int y1, int x2, int y2 )
paintCount += 1
setText(StatusBar3, sprintf("Paint Count: %d", paintCount))
end procedure
setHandler( RichEdit2, w32HPaint, routine_id("RichEdit2_onPaint"))
WinMain( Window1,Normal )
>
>
> posted by: Brian Broker <bkb at cnw.com>
>
> Alex Chamberlain wrote:
> >
> > This is a multi-part message in MIME format.
>
> Please disable MIME and HTML when sending to the list. Use plain text
only.
>
> >
> > Is anyone else having a problem with RichEdits turning grey and only
printing |||||||||||||||
> > when you type after calling a paint event?
> >
> > Anybody have an answer to the problem?
> >
> > (Running on XP)
> >
> > Alx
>
> Do you have an example that exhibits this behavior?
4. Re: RichEdit - Paint Event
- Posted by Don <eunexus at yahoo.com>
Dec 16, 2004
-
Last edited Dec 17, 2004
> Problem program:
> -- code generated by Win32Lib IDE v0.18.22
<SNIP>
Work around... use an event handler instead
procedure RichEdit2_onPaint (atom w, atom a, sequence Params )
if Params[1] = WM_PAINT then
paintCount += 1
setText(StatusBar3, sprintf("Paint Count: %d", paintCount))
end if
end procedure
setHandler( RichEdit2, w32HEvent, routine_id("RichEdit2_onPaint"))
Cheers!
Don Phillips - aka Graebel
National Instruments
mailto: eunexus @ yahoo.com
5. Re: RichEdit - Paint Event
Don wrote:
>
> > Problem program:
> > -- code generated by Win32Lib IDE v0.18.22
>
> <SNIP>
>
> Work around... use an event handler instead
>
> }}}
<eucode>
> procedure RichEdit2_onPaint (atom w, atom a, sequence Params )
> if Params[1] = WM_PAINT then
> paintCount += 1
> setText(StatusBar3, sprintf("Paint Count: %d", paintCount))
> end if
> end procedure
> setHandler( RichEdit2, w32HEvent, routine_id("RichEdit2_onPaint"))
> </eucode>
{{{
>
> Cheers!
>
> Don Phillips - aka Graebel
> National Instruments
> mailto: eunexus @ yahoo.com
>
Don's solution works but it begs the question: What are you trying to achieve?
Edit controls don't require a paint handler. Are you really just interested
in the number of paint events the control has received?
-- Brian
6. Re: RichEdit - Paint Event
I was trying to do something with text typed or inserted. These both call
paint events.
Alx
----- Original Message -----
From: "Brian Broker" <guest at RapidEuphoria.com>
To: <EUforum at topica.com>
Sent: Friday, December 17, 2004 6:21 PM
Subject: Re: RichEdit - Paint Event
>
>
> posted by: Brian Broker <bkb at cnw.com>
>
> Don wrote:
> >
> > > Problem program:
> > > -- code generated by Win32Lib IDE v0.18.22
> >
> > <SNIP>
> >
> > Work around... use an event handler instead
> >
> > }}}
<eucode>
> > procedure RichEdit2_onPaint (atom w, atom a, sequence Params )
> > if Params[1] = WM_PAINT then
> > paintCount += 1
> > setText(StatusBar3, sprintf("Paint Count: %d", paintCount))
> > end if
> > end procedure
> > setHandler( RichEdit2, w32HEvent, routine_id("RichEdit2_onPaint"))
> > </eucode>
{{{
> >
> > Cheers!
> >
> > Don Phillips - aka Graebel
> > National Instruments
> > mailto: eunexus @ yahoo.com
> >
>
> Don's solution works but it begs the question: What are you trying to
achieve?
> Edit controls don't require a paint handler. Are you really just
interested
> in the number of paint events the control has received?
>
> -- Brian
>
>
>
>