View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0016202||Lazarus||LCL||public||2010-04-05 12:02||2010-04-16 21:51|
|Reporter||Flávio Etrusco||Assigned To||Mattias Gaertner|
|Product Version||0.9.29 (SVN)|
|Fixed in Version||0.9.29 (SVN)|
|Summary||0016202: AutoSized panels ignore InnerBorder (NewAutoSize)|
|Description||Actually, Right and Bottom borders of "bottom-most" and "right-most" children controls are ignored until you change Parent's border (changing InnerBorder trigger the realign, but it's own value is ignored).|
|Tags||No tags attached.|
|Fixed in Revision|
Maybe you misunderstood InnerBorder, which is probably the fault of the wrong documentation. I updated the docs about InnerBorder:
Amount of pixel added to the widgetset's preferred size
When calculating the preferred size of control, the LCL asks first the widgetset. For controls like TButton the widgetset can return a preferred size. The InnerBorder is added twice to this size. If the widgetset does not return a preferred size, the InnerBorder is not used.
Otherwise: Can you provide a small example?
I definitely should have explained it better :-$
1) Add one panel to the form.
2) Add two buttons inside the panel.
3) Enable AutoSize in the panel.
4) Change the panel BorderSpacing.InnerBorder.
I would expect the panel size to change. Should I?
The issue with Right and Bottom borders of children (the buttons) was already solved by the latest fixes to AutoSize.
Spoke too soon. Right and Bottom borders still don't trigger an immediate resize sometimes.
The InnerBorder seems to not apply to AutoSize/internal controls? Setting a large enough value I can make the Height change (apparently to 2*InnerBorder).
InnerBorder has no effect for TPanel.
Maybe you are searching for ChildSizing.LeftTopSpacing?
Well, that works. But what's the purpose of (and what controls use) InnerBorder?
Won't LeftTopSpacing affect spacing between the childcontrols?
No LCL control uses InnerBorder. You can use it to make TButtons bigger than normal.
Spacing between child controls: ChildSizing.HorizontalSpacing
Thanks, the Spacing naming makes sense now. (Out of curiosity, why are the values tied together - TopLeft vs Top+Left -?)
InnerBorder still doesn't make lot of sense, though. I can't follow why 'Around' applies and 'InnerBorder' doesn't. BTW, where can I find updated documentation? http://www.freepascal.org/docs-html/lcl/controls/tcontrolborderspacing.html doesn't even mention InnerBorder. Thinking better, since it has a different naming scheme (xxxBorder) one can suspect it's a different thing. But then it could be called something else, like ComponentBorder. And make the value be reset automatically when it's not supported.
Also, can you reproduce the bug with setting a big InnerBorder in TPanel?
||InnerBorder is now always added. Unless a control overrides CalculatePreferredSize.|
|2010-04-05 12:02||Flávio Etrusco||New Issue|
|2010-04-05 12:02||Flávio Etrusco||LazTarget||=> -|
|2010-04-05 12:02||Flávio Etrusco||Widgetset||=> GTK 2|
|2010-04-05 12:03||Flávio Etrusco||Relationship added||child of 0016013|
|2010-04-05 22:26||Mattias Gaertner||Note Added: 0036471|
|2010-04-05 22:26||Mattias Gaertner||Assigned To||=> Mattias Gaertner|
|2010-04-05 22:26||Mattias Gaertner||Status||new => feedback|
|2010-04-06 09:26||Flávio Etrusco||Note Added: 0036482|
|2010-04-06 09:26||Flávio Etrusco||Status||feedback => assigned|
|2010-04-06 09:29||Flávio Etrusco||Summary||AutoSize'd groupboxes ignore InnerBorder and ChildControls borders with NewAutoSize => AutoSized panels ignore InnerBorder (NewAutoSize)|
|2010-04-06 10:06||Flávio Etrusco||Note Added: 0036484|
|2010-04-06 10:32||Mattias Gaertner||Note Added: 0036486|
|2010-04-06 11:56||Flávio Etrusco||Note Added: 0036494|
|2010-04-06 13:20||Mattias Gaertner||Note Added: 0036495|
|2010-04-06 17:25||Flávio Etrusco||Note Added: 0036497|
|2010-04-06 17:26||Flávio Etrusco||Note Edited: 0036497|
|2010-04-06 17:29||Flávio Etrusco||Note Edited: 0036497|
|2010-04-07 07:39||Flávio Etrusco||Note Edited: 0036497|
|2010-04-08 19:54||Mattias Gaertner||Note Added: 0036555|
|2010-04-08 19:54||Mattias Gaertner||Status||assigned => resolved|
|2010-04-08 19:54||Mattias Gaertner||Resolution||open => fixed|
|2010-04-16 21:51||Flávio Etrusco||Status||resolved => closed|
|2010-04-16 21:51||Flávio Etrusco||Fixed in Version||=> 0.9.29 (SVN)|