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

How to resize GroupBar at runtime?

The user can't resize GroupBar when the application is runing.
Is there a way to resize GroupBar at runtime?
Best regards

5 Replies

KR Kannan R Syncfusion Team December 17, 2018 06:57 AM UTC

Hi Cosyspro, 
Thank you for contacting Syncfusion Support. 
Our GroupBar can be resized in run time only if StackMode is enabled. Please find the code snippet in below. 
Code Snippet: [C#] 
this.gbVisualStudio.StackedMode = true; 
Please check above solution and let us know if it helps. Otherwise if we have misunderstood your query, kindly explain what kind of resizing you are expecting.  

CO Cosyspro December 18, 2018 08:48 AM UTC

Tank for response.
1) First question: Yes,  StackedMode = true but I can't resize GroupBar in runtime! I used the following parameters to configure my GroupBar:  
            // groupeBar1
            this.groupeBar1.AllowCollapse = true;
            this.groupeBar1.AllowDrop = true;
            this.groupeBar1.AnimatedSelection = false;
            this.groupeBar1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
            this.groupeBar1.BeforeTouchSize = new System.Drawing.Size(172, 458);
            this.groupeBar1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(198)))), ((int)(((byte)(198)))));
            this.groupeBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.groupeBar1.CollapsedText = "Tâches المهام";
            this.groupeBar1.CollapseImage = ((System.Drawing.Image)(resources.GetObject("groupeBar1.CollapseImage")));
            this.groupeBar1.Dock = System.Windows.Forms.DockStyle.Right;
            this.groupeBar1.EnableSplittercolorCustomization = true;
            this.groupeBar1.ExpandButtonToolTip = "Cliquez ici pour afficher les tâches انقر هنا لعرض المهام";
            this.groupeBar1.ExpandedWidth = 172;
            this.groupeBar1.ExpandImage = ((System.Drawing.Image)(resources.GetObject("groupeBar1.ExpandImage")));
            this.groupeBar1.FlatLook = true;
            this.groupeBar1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(38)))), ((int)(((byte)(38)))));
            this.groupeBar1.GroupBarDropDownToolTip = null;
            this.groupeBar1.GroupBarItems.AddRange(new Syncfusion.Windows.Forms.Tools.GroupBarItem[] {
            this.groupeBar1.HeaderBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
            this.groupeBar1.HeaderFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
            this.groupeBar1.HeaderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(38)))), ((int)(((byte)(38)))));
            this.groupeBar1.IndexOnVisibleItems = true;
            this.groupeBar1.Location = new System.Drawing.Point(610, 2);
            this.groupeBar1.MaximumSize = new System.Drawing.Size(250, 0);
            this.groupeBar1.MetroScrollBars = true;
            this.groupeBar1.MinimizeButtonToolTip = null;
            this.groupeBar1.Name = "groupeBar1";
            this.groupeBar1.NavigationPaneTooltip = null;
            this.groupeBar1.PopupClientSize = new System.Drawing.Size(0, 0);
            this.groupeBar1.SelectedItem = 0;
            this.groupeBar1.ShowChevron = false;
            this.groupeBar1.ShowItemImageInHeader = true;
            this.groupeBar1.ShowNavigationPane = false;
            this.groupeBar1.Size = new System.Drawing.Size(172, 458);
            this.groupeBar1.SmartSizeBox = false;
            this.groupeBar1.Splittercolor = System.Drawing.Color.Red;
            this.groupeBar1.StackedMode = true;
            this.groupeBar1.TabIndex = 1;
            this.groupeBar1.Text = "groupBar1";
            this.groupeBar1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Office2016Colorful;

2) Seconde question : Please, see the attached image to know what I want to do ?

Best ragards.

Attachment: images_bf65c6b3.zip

KR Kannan R Syncfusion Team December 19, 2018 05:46 AM UTC

Hi Cosyspro,  
Thank you for your update. 
We hope you are using our latest version and we tested in this version. We can find runtime resizing is working fine with the provided code settings applied in GroupBar. Please find the sample and video in below. 
Can you please confirm if you are facing lagging in resizing process or you cannot resize at all? Upon we your confirmation we can proceed on this. 

CO Cosyspro December 19, 2018 08:15 AM UTC

Hi Kannan,
Thank you for your response.
Now, I am using the latest version The horizontal resizing does not work.

Can you answer my second question ? See the previous post.


AA Arulraj A Syncfusion Team December 20, 2018 11:43 AM UTC

Hi Cosyspro, 

Thanks for your update. 

Query 1: Now, I am using the latest version The horizontal resizing does not work. 
Currently, we don’t have support to resize the GroupBar horizontally. We suggest you to use our TabSplitterContainer control which offers you horizontal resizing support, we have prepared simple sample and it can be downloaded from below location 

Query 2: Please, see the attached image to know what I want to do ? 
From your screenshot, we understood that you need to hide the GroupViewItem’s image while collapsing. If so, we don’t have support to hide the GroupViewItem in GroupBar. Please let us know if we misunderstood your query. 

Arulraj A 

Live Chat Icon For mobile
Up arrow icon