[Lazarus] Grids, once more (Jesus, please read)
Michael Van Canneyt
michael at freepascal.org
Sat Jun 21 00:31:22 CEST 2008
On Fri, 20 Jun 2008, Jesus Reyes wrote:
>
>
>
> --- 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?
Hm. But what is the position then ? Col,Row ?
Michael.
More information about the Lazarus
mailing list