We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Multiple inheritances issue inacse of “GridbagLayout”

The form did Inherit RibbonForm, I had removed the RibbonForm Inheritance as I was checking “GridbagLayout” The Gridbaglayout sample shows that the form has to inherit the gridbaglayout Class. .NET Does not allow multiple inheritances so how to proceed in this case, please suggest.


1 Reply

VS Vallarasu S Syncfusion Team June 28, 2011 04:27 AM UTC

Hi Uday,

Thanks for your interest in Syncfusion products.

GridBagLayout does not requires the container to inherit from the 'GridBagLayout' class, The form in the sample is named so to indicate the layout the form is applied with.

You can have GridBagLayout in your form along with RibbonForm appearance as follows, GridBagLayout will be applied to the container control assigned to the GridBagLayout.ContainerControl API. You can even place the controls inside a panel and assign this to the GridBagLayout.


public class MyForm : RibbonForm
{
Syncfusion.Windows.Forms.Tools.GridBagLayout gridBagLayout1;
System.ComponentModel.IContainer components;

public MyForm()
{
this.components = new System.ComponentModel.Container();
gridBagLayout1 = new GridBagLayout(this.components);
gridBagLayout1.ContainerControl = this;
}
}


Let me know if you need any further assistance.

Regards,
Vallarasu S.


Loader.
Live Chat Icon For mobile
Up arrow icon