[Lazarus] Grids, once more (Jesus, please read)

Jesus Reyes jesusrmx at yahoo.com.mx
Fri Jun 20 23:22:14 CEST 2008




--- El vie 20-jun-08, Michael Van Canneyt <michael at freepascal.org> escribió:

> De:: Michael Van Canneyt <michael at freepascal.org>
> Asunto: [Lazarus] Grids, once more (Jesus, please read)
> A: "Lazarus mailing list" <lazarus at lazarus.freepascal.org>
> Fecha: viernes, 20 junio, 2008, 3:10 pm
> Jesus,
> 
> You made a mistake in your grid fixes, EditorPos. All my
> demos crash !!
> 
> Your code:
> 
>   if FEditor<>nil then begin
>     // send editor position
>     Msg.LclMsg.msg:=GM_SETPOS;
>     Msg.Grid:=Self;
>     Msg.Col:=FCol;
>     Msg.Row:=FRow;
>     // send editor bounds
>     FEditor.Dispatch(Msg);
>     Msg.CellRect:=CellRect(FCol,FRow);
> 
> This is wrong, because cellrect should be initialized prior
> to sending !
> 
> It should be 
> 
>     // send editor position
>     Msg.LclMsg.msg:=GM_SETPOS;
>     Msg.Grid:=Self;
>     Msg.Col:=FCol;
>     Msg.Row:=FRow;
>     // send editor bounds
>     Msg.CellRect:=CellRect(FCol,FRow);
>     FEditor.Dispatch(Msg);
> 
> After fixing this, it works again here.
> 
> Michael.


this was done before my last patch, have many problems with it so I decided to create a message for changing editor position and once for adjusting editor bounds, maybe you should use GM_SETBOUNDS instead of GM_SETPOS?

Jesus Reyes A.


      ____________________________________________________________________________________
Yahoo! Deportes Beta
¡No te pierdas lo último sobre el torneo clausura 2008! Entérate aquí http://deportes.yahoo.com




More information about the Lazarus mailing list