TButton / TBitBtn issue

Must be me because this issues happens with several components.  I am using C++ Builder XE7.
Add a TButton to a form.  Change the Anchors to akLeft and akBottom (uncheck akTop).  Resize the form vertically, everything seems ok.  Now uncheck akBottom.  Resize the form vertically.  The button moves, when only akLeft is checked.  No matter what attributes you change, it will always be anchored to the bottom once that box is checked, even if unchecked.  If you want to remove the bottom anchor, you must delete the button and add a new button.
0
Doug
8/5/2015 5:02:09 AM
📁 embarcadero.cppbuilder.using
📃 1848 articles.
⭐ 1 followers.

💬 1 Replies
👁️‍🗨️ 714 Views


Doug wrote:
> Add a TButton to a form.  Change the Anchors to akLeft and
> akBottom (uncheck akTop).  Resize the form vertically, everything
> seems ok. Now uncheck akBottom.  Resize the form vertically.
> The button moves, when only akLeft is checked.
This is correct behavior and is by design.  It is not specific to XE7, either. 
 It happens in earlier versions, too.
Since you have both akTop and akBottom unchecked, there is nothing to hold 
the button in place vertically, so it moves in relative proportion to changes 
in its parent's Height regardless of the button's Top property.  If you want 
the button to stay in place and respect its Top property, you need to enable 
the akTop anchor.
-- 
Remy Lebeau (TeamB)
0
Remy
8/5/2015 6:25:42 PM
Reply: