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

How to dynamicly create GroupBarItem and linklabels in GroupBarBox

I have a Group Bar named "tsbCategory" within XPTaskBarBox named tskReport. I want to dynamiclly populate tsbCategory''s GroupBarItem with a string array named msCategories. Inside each GroupBarItem, I add a panel to hold several linklabel controls inside. I did it with following code. I can see the the group each bar item and its linklabels. The problem is the the GourpBar layout not freshed,the linklabel is overlaying on groupbar items. How can i sovle it? TIA Coding: private string[] msCategories={"Parameters","Models","Inventory","Present Status","Rehabilitation"}; private void frmReport_Load(object sender, System.EventArgs e) { foreach (string s in msCategories) { Syncfusion.Windows.Forms.Tools.GroupBarItem gbiCategory; gbiCategory = new Syncfusion.Windows.Forms.Tools.GroupBarItem(); gbiCategory.Tag=s; gbiCategory.Text=s; this.gbrCategory.GroupBarItems.Add(gbiCategory); Syncfusion.Windows.Forms.Tools.GradientPanel pnlClient; pnlClient = new Syncfusion.Windows.Forms.Tools.GradientPanel(); gbiCategory.Client = pnlClient; gbiCategory.Client.Width=172; gbiCategory.Client.Height=172; gbiCategory.Visible=true; pnlClient.Visible=true; pnlClient.Name = "pnl" + s; pnlClient.BackColor = System.Drawing.Color.Transparent; pnlClient.Border3DStyle = System.Windows.Forms.Border3DStyle.Flat; pnlClient.BorderColor = System.Drawing.Color.Transparent; pnlClient.BorderStyle = System.Windows.Forms.BorderStyle.None; pnlClient.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); pnlClient.Location = new System.Drawing.Point(0, 0); pnlClient.Size = new System.Drawing.Size(172, 172); this.gbrCategory.Controls.Add(pnlClient); for (int i=1;i<=10;i++) { STN.PMA.UL.tmpLinkLabel lnkRpt1=new tmpLinkLabel(); lnkRpt1.Text="Report"+i.ToString(); lnkRpt1.Name="Report"+i.ToString(); lnkRpt1.Visible=true; lnkRpt1.Location=new Point(0,(i-1)*20); pnlClient.Controls.Add(lnkRpt1); } gbiCategory.Client.Refresh(); this.Refresh(); } }

2 Replies

AD Administrator Syncfusion Team September 17, 2004 11:20 PM UTC

I reposted your message in the Tools forum. See http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=19130. This will give you s better chance to get an answer ... Stefan


AD Administrator Syncfusion Team September 18, 2004 11:07 PM UTC

Hi, Your forum posting has been updated on the Tools forum. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=19130 Please refer to it and let me know if you need any other information. We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon