[Lazarus] New AutoSize issue
Mattias Gärtner
nc-gaertnma at netcologne.de
Fri May 21 12:21:51 CEST 2010
Zitat von faber <faber.cpu at gmail.com>:
>> I guess it is a win32 interface bug, because you wrote it
>> works on some windows and not on windows XP.
>> The calls are in lcl/interfaces/win32/win32wscontrols.pp
>>
>> TWin32WSWinControl.ShowHide
>>
>> Add there a debug line:
>>
>> debugln(['TWin32WSWinControl.ShowHide ',dbgsname(AWinControl),'
>> ',AWinControl.HandleObjectShouldBeVisible]);
>>
>> Run it.
>> Is the stringgrid made visible there?
>>
>>
> TWin32WSWinControl.ShowHide SR1:TStringGrid1 True - and I don't see
> SR1
Thanks for testing.
> but what I observed, sometime on good working WinXP there is also problem
> with showing Arrow also, as example, that debug:
>
> TWin32WSWinControl.ShowHide StopA:TButton False
> TWin32WSWinControl.ShowHide :TStringGrid1 False
> 449-:-743 -1
> 449-:-743 -1
> TWin32WSWinControl.ShowHide OptsR:TArrow True
> TWin32WSWinControl.ShowHide SR1:TStringGrid1 True
>
> don't show Arrow but show SR1.
> But what's important, I observed that the problem occurs only when the order
> of debug lines is wrong (on autosizing delayed). When I get that debug:
> set sr1 to visible
> 449-:-743 -1
> 449-:-743 -1
> TWin32WSWinControl.ShowHide SR1:TStringGrid1 True
> TWin32WSWinControl.ShowHide :TStringGrid1 False
> TWin32WSWinControl.ShowHide OptsR:TArrow True
> TWin32WSWinControl.ShowHide StopA:TButton False
> then everything is always ok.
Weird.
The order should not matter for the winapi. I hope some winapi expert
has seen something like this and can give some hint.
Maybe the SR1 is not at the right position.
In the unit lcl/interfaces/win32wscontrols.pp in procedure
TWin32WSWinControl.SetBounds after the line AdaptBounds you can add a
debugln:
debugln(['TWin32WSWinControl.SetBounds ',dbgsname(AWinControl),'
l=',IntfLeft,' t=',IntfTop,' w=',IntfWidth,' h=',IntfHeight,'
suppress=',suppressMove]);
Is SR1 getting the right bounds?
> And during the testing, I got this error once:
>
> set sr1 to visible
> 449-:-743 -1
> 449-:-743 -1
> TWin32WSWinControl.ShowHide SR1:TStringGrid1 True
> TWin32WSWinControl.ShowHide :TStringGrid1 False
> TWin32WSWinControl.ShowHide TWin32WSWinControl.ShowHide
> TWin32WSWinControl.ShowH
> ide StopA:TButton False
> TApplication.HandleException Disk Full
Either your disk was full or there is too much output so that there is
a congestion that windows can not handle fast enough. You are writing
the output to a file, don't you?
Mattias
More information about the Lazarus
mailing list