I use the width to determine where the right arrow would go, choosing to place it just inside the right edge of the frame rather than at the end of the tabs.
I found it recommended to change over to Align = alClient, it was alNone. Had to rejig a bit and put an OnResize into the frame (the way it had worked was the OnResize of the parent form had a call to a manual resize method). This has made the program behave rather differently and I need to re-evaluate this change
There may be another solution to your problem....
But, I do recommend to keep debugging it, for the sake of learning.
If you need to watch values/changes of a particular object, then
conditional breakpoints may be useful.
E.g. if you set a breakpoint in TControl.ChangeBounds or other methods in the LCL that are used by many controls. You may just be interested in calls for a specific control (the shape displaying your arrow).
Use a watch to get the value for
pointer(self)
Then in the breakpoint add the condition (replace the number as found by the watch)
pointer(self) = $5101234
And the debugger will only stop if that condition is true.
Using "align" and other properties may indeed be a better way.
If you need the arrow to be at a fixed distance from the RIGHT EDGE of its parent, then you can
1) In the property Anchors, set the value akRight and remove akLeft. Then it will move with the right side of the parent
2) Better: Open the AnchorEditor (the "..." on the Anchors property)
For the left anchor
- UN-set Enabled
For the right anchor
- Set Enabled
- select the parent as Sibling
- select the button "Anchor right side to right side of sibling"
- Set the distance in the spin edit
And the control will be fixed there.
You can access those values from code, e.g.
Button1.AnchorSide[akRight].Control :=;
Button1.AnchorSide[akRight].Side := ;
Button1.BorderSpacing.Right :=
And then you don't need any OnResize.
If you need grid like layouts check "ChildSizing"