Hi,
I am upgrading from an old solution, see http://www.telerik.com/community/forums/winforms/ui-controls/labelmultilinetextbox-with-validation.aspx, since this version is missing some functionality which I now need.
My class inherits from RadTextBox where I override CreateChildItems and create my own.
I follow the logic from your source and it all works perfectly. Except the multiline property, how can I implement it?
I use the following controls.
private readonly RadTextBoxItem textBox = new RadTextBoxItem();
private readonly TextPrimitive title = new TextPrimitive();
private readonly TextPrimitive validation = new TextPrimitive();
A cut down version of CreateChildItems
BoxLayout layoutTexts = new BoxLayout();
layoutTexts.Orientation = Orientation.Horizontal;
layoutTexts.StretchVertically = false; // when true the control is drawn differently
layoutTexts.Children.Add(title);
layoutTexts.Children.Add(validation);
BoxLayout layout = new BoxLayout();
layout.Orientation = Orientation.Vertical;
layout.Children.Add(layoutTexts);
base.InitializeTextElement();
layout.Children.Add(textBoxElement);
RootElement.Children.Add(layout);
Size = new Size(425, 34); // default size
Thanks
- jorge