I would like to add a button, maybe two, to the GroupHeader of a RadGroupBox, I've tried the following, however the button is not the correct size, it looks like it's being rendered at one pixel wide:
public class TestGroupBox : RadGroupBox
{
private StackLayoutPanel m_objStackLayoutPanel = new StackLayoutPanel ();
private RadButtonElement m_objButton = new RadButtonElement();
public class TestGroupBox : RadGroupBox
{
private StackLayoutPanel m_objStackLayoutPanel = new StackLayoutPanel ();
private RadButtonElement m_objButton = new RadButtonElement();
protected override void CreateChildItems( RadElement parent )
{
base.CreateChildItems( parent );
m_objStackLayoutPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
ImageAndTextLayoutPanel panel = this.GroupBoxElement.Header.Children[2] as ImageAndTextLayoutPanel;
this.GroupBoxElement.Header.Children.RemoveAt( 2 );
this.GroupBoxElement.Header.Children.Add( m_objStackLayoutPanel );
m_objStackLayoutPanel.Children.Add( m_objButton );
m_objButton.Size = new System.Drawing.Size( 16, 16 );
m_objStackLayoutPanel.Children.Add( panel );
}
}