Hmmm, not very great but thanks Felipe, what version you use? I have tried with 0.9.28/FPC 2.2.4 and last svn/FPC 2.2.5 same.
I tried like you and this strange behavior when there is an event. I found a workaround, I hope this does not too unstable with the LCL 2009/10/7 Felipe Monteiro de Carvalho <[email protected]> > It works if you don't update the caption but rather write the string > to a field or to the console. So one can assume that you cannot update > the LCL from this callback, for whatever reason. > > You can build a list of updates to be done and fill it and then unfill > it with a timer. > > This code worked for me: > > TForm1 = class(TForm) > Label1: TLabel; > Timer1: TTimer; > procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); > procedure FormCreate(Sender: TObject); > procedure Timer1Timer(Sender: TObject); > private > { private declarations } > DccMan: TDccMan; > StatusStr: string; > procedure Change(Sender: TObject); > public > { public declarations } > end; > > ............. > > procedure TForm1.Timer1Timer(Sender: TObject); > begin > Label1.Caption := StatusStr; > end; > > procedure TForm1.Change(Sender: TObject); > begin > StatusStr := DccMan.StatusStr; > end; > > > -- > Felipe Monteiro de Carvalho > > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Laurent.
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
