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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TabbedMdi "Create New Horizontal Group" for each open tab

Thread ID:





63672 Jul 6,2007 06:10 PM UTC Jul 16,2007 02:46 PM UTC WinForms 1
Tags: Tools
Alan Read
Asked On July 6, 2007 06:10 PM UTC

What is the best way to programmatically go through all open tabs and create a new horizontal group?

I tried the code below:
foreach(Form form in this.tabbedMDIManager.MdiChildren)
form.Activate(); if(this.tabbedMDIManager.CanCreateNewHorizontalGroup())
{ this.tabbedMDIManager.CreateNewHorizontalGroup();

It works but it has a horrible repainting issue where as if I go to each tab and use the right click menu "Create New Horizontal Tab Group" everything is fine. So is their anyway to access the right click context menu of a tab programtically?


I am using v5.1 trial of essential tools

Rashidha F [Syncfusion]
Replied On July 16, 2007 02:46 PM UTC

Hi Alan,

My apologies for the delay in responding to you.

If your intention is to create a HorizontalGroup without using ContextMenu means, please use the following code snippet in button_click Event.

Form childform = new Form();
childform.WindowState = FormWindowState.Normal;
childform.Text = "MDI Child Form " + count.ToString();
childform.MdiParent = this;

Using Beforpopup Event and clear method you can disable and clear the contextmenu respectively.

void ContextMenuItem_BeforePopup(object sender, CancelEventArgs e)
e.Cancel = true;

You can add the new item in context menu using Add() Method in tabbedMDIManager. The following code snippet which illustrate how to add a neww context menu item in tab.

BarItem x = new BarItem();
x.Text = "New";
x.Click += new EventHandler(x_Click);

Pleasse refer the attached sample.


The above sample which illustrates how to create horizontalgroupbar and how to customize the tab using contextmenu programatically.

Thanks and Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon