[Lazarus] New AutoSize issue

Mattias Gaertner nc-gaertnma at netcologne.de
Thu May 13 23:59:21 CEST 2010


On Thu, 13 May 2010 22:41:22 +0100
Martin <lazarus at mfriebe.de> wrote:

> On 13/05/2010 22:35, faber wrote:
> > I thought that all is ok but unfortunately not.
> > I have a problem with the new autosize, it is difficult to me to
> > create a bug report because the application is quite big and the error
> > does not occur always.
> >
> > In short:
> > I have assigned to the panel (stringgrid.parent=panel) three
> > stringgrid objects, all have align = alClient and they are displayed
> > separately (all three objects are created, only I switch visible).
> > With the new autosize at some point when loading data to stringgrid
> > and when I set Visible = true then sometimes stringgrid don't shows.
> > It is strange because it happens not always on different systems.
> > Often I have a problem on Vista (Intel Core Duo) and Windows 2000 on
> > VirtualBox, on system where I compile a program Windows XP, it
> > happened maybe once.
> > With -dOldAutoSize all is ok. Maybe multi-threading in my application
> > makes this problem ? I tried to find the problem and I suspect that
> > stringgrid not quite finished loading the data when I try to view it.
> > However, I put "sleep" before Visible := true and does not help.
> > Maybe someone has some tips ?
> >    
> 
> which revision are you on?
> 
> Because afaik on the latest Lazarus the -dOldAutoSizedoes nothing 
> anymore (the option was removed, new autosize is always used)
> So maybe you need to update first and try again?

Yes, OldAutoSize was removed a week ago in revision 25190.
Please update and test with current version.

About multithreading: All LCL operations should be done in the main
thread.
Does hiding the other stringgrids work?
Have you checked what size the new stringgrid gets? Check the OnResize
event of the stringgrids.

Mattias




More information about the Lazarus mailing list