View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0014546||Lazarus||LCL||public||2009-09-09 12:23||2011-10-28 09:57|
|Reporter||Sven Barth||Assigned To||Jesus Reyes|
|Product Version||0.9.26.3 (SVN)|
|Fixed in Version||0.9.31 (SVN)|
|Summary||0014546: ClientWidth in TDrawGrid is first equal to Width and later to "real" ClientWidth|
|Description||On start of an application with a TDrawGrid (ScrollBars=ssVertical) the grid's ClientWidth is equal to its Width (in attached example 224 pixels). When I change ScrollBars property to ssNone the ClientWidth is set to a different width (220). Activating the vertical scrollbar (ScrollBars=ssVertical) again, results in the width of the real client area (203).|
I believe ClientHeight will behave the same way.
|Additional Information||I only checked this on Win32 so far. In WinCE I have to face another bug with scrollbar visibility ^^|
|Fixed in Revision|
drawgridwidth.zip (157,543 bytes)
When the object creation stage has finished the OnCreate form event is triggered, at this time all childs are already created but their window handles are not yet ready, and it seems getting the real clientwidth is not reliable until all window handles are created. I don't know if this is particular to Lazarus or this behaviour is delphi compatible.
A more reliable place to get childs clientwidth is OnShow form event, I moved the UpdateLabel call there and it shows the expected clientwidth 203.
In any case I think this is not a particular problem of grids but a general behaviour for all components that have a handle.
|2009-09-09 12:23||Sven Barth||New Issue|
|2009-09-09 12:23||Sven Barth||File Added: drawgridwidth.zip|
|2009-09-09 12:23||Sven Barth||Widgetset||=> Win32/Win64|
|2009-09-09 13:25||Vincent Snijders||LazTarget||=> 1.0|
|2009-09-09 13:25||Vincent Snijders||Assigned To||=> Jesus Reyes|
|2009-09-09 13:25||Vincent Snijders||Status||new => assigned|
|2009-09-09 13:25||Vincent Snijders||Target Version||=> 1.0.0|
|2010-03-15 03:54||Jesus Reyes||Tag Attached: grids|
|2010-05-28 09:32||Felipe Monteiro de Carvalho||Relationship added||related to 0014548|
|2011-04-04 05:35||Paul Ishenin||LazTarget||1.0 => 0.99.0|
|2011-04-04 05:38||Paul Ishenin||Target Version||1.0.0 => 0.99.0|
|2011-10-02 17:42||Felipe Monteiro de Carvalho||LazTarget||0.99.0 => 1.0|
|2011-10-28 09:57||Jesus Reyes||Status||assigned => resolved|
|2011-10-28 09:57||Jesus Reyes||Fixed in Version||=> 0.9.31 (SVN)|
|2011-10-28 09:57||Jesus Reyes||Resolution||open => not fixable|
|2011-10-28 09:57||Jesus Reyes||Note Added: 0053539|