AX 2012 Forms – AlignControl Property

By Laura Lake | March 24, 2014

This is just a nagging little thing I ran into recently with AX 2012 Forms. Maybe I can save some of you the time and aggravation.

I was designing a wizard form, so I had pages that needed some instructional text along with the controls allowing user to choose parameters.

For example…

AX 2012 Forms

Notice the alignment of the StringEdit control.  I wanted this text to be aligned at the left side of the form. This behavior is caused by a sneaky little property on the control called “AlignControl”. The problem was, I had set the property ShowLabel to No, since I just wanted the Text value to display and the label was unnecessary. Well, the intention of AlignControl is to align contols based on the longest label. So the left edge of the StringEdit control is aligned with the other controls based on the length of the “Select Customer” label.

AlignControl has a default value of Yes. If you have ShowLabel set to No, changing AlignControl to No will allow you to line up the text as needed. For example…

Align

Result...

StringEdit Control's Test property value


Under the terms of this license, you are authorized to share and redistribute the content across various mediums, subject to adherence to the specified conditions: you must provide proper attribution to Stoneridge as the original creator in a manner that does not imply their endorsement of your use, the material is to be utilized solely for non-commercial purposes, and alterations, modifications, or derivative works based on the original material are strictly prohibited.

Responsibility rests with the licensee to ensure that their use of the material does not violate any other rights.

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!