Approved
Last Updated: 30 Mar 2016 14:32 by ADMIN
ADMIN
George
Created on: 10 Jul 2014 10:46
Category: Panel, CollapsiblePanel, Label, GroupBox
Type: Bug Report
0
FIX. RadLabel - setting Margin to the LabelText and TextAlignment when the AutoSize property is set to true does not produce correct layout
To reproduce:

Add a RadLabel to a Form. Set the Margin and TextAlignment properties as well as some text:

this.radLabel1.AutoSize = true;

this.radLabel1.LabelElement.LabelText.Margin = new System.Windows.Forms.Padding(10, 10, 10, 10);
this.radLabel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
this.radLabel1.Text = "This text should appear middle-center";

You will see that the text is not aligned at the center of the label.

Workaround:

Set the Margin to the layout panel instead:

this.radLabel1.LabelElement.Children[2].Margin = new Padding(10);

Or from the ElementEditor -> LabelElement -> ImageAndTextLayoutPanel
0 comments