Re: DBGrid1.OnDrawColumnCell goes into infinite loop
- From: "Chris L." <christopher.leongc@xxxxxxxxxxx>
- Date: Fri, 27 Jan 2006 16:48:13 GMT
Hi Alan,
It does not help in my case. When I move the column with the CheckBox
floating over it, you can still see the CheckBox being redrawn continuously
after the move.
However, it's good to know this information.
Chris
<alanglloyd@xxxxxxx> wrote in message
news:1138343113.276693.60460@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > The drawing of the active column Checkbox going into
> > infinite loop and causes the screen to freeze. There is
> > no code in OnColumnMoved method.
>
> I can't see where, but obviously the OnDrawColumnCell is being called
> by something _in_ its code, via some other external code. So unhitch
> whatever is calling the OnDrawColumnCell while _your code_ in it is
> executing.
>
> At the beginning of your OnDrawColumnCell code do ...
>
> DBGrid1.OnDrawColumnCell := nil;
>
> ... and at the end do ...
>
> DBGrid1.OnDrawColumnCell := DBGrid1DrawColumnCell;
>
> Then the ODCC code will not be called by external events while the ODCC
> code is working.
>
> This is a general solution to recursion problems in OnDraw control
> event handlers.
>
> Alan Lloyd
>
.
- References:
- DBGrid1.OnDrawColumnCell goes into infinite loop
- From: Chris L.
- Re: DBGrid1.OnDrawColumnCell goes into infinite loop
- From: alanglloyd@xxxxxxx
- DBGrid1.OnDrawColumnCell goes into infinite loop
- Prev by Date: Re: Event handlers...
- Next by Date: Re: Event handlers...
- Previous by thread: Re: DBGrid1.OnDrawColumnCell goes into infinite loop
- Next by thread: Re: DBGrid1.OnDrawColumnCell goes into infinite loop
- Index(es):
Relevant Pages
|