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

Statusbar Panel Width

Hi, we use SF Suite 3.0.1.0 and I discovered a problem with the statusbar. Using german locale the date and time panels size to correct width. Using other locale (e.g. en-US) the panels do not resize to show the entire content. Even if I use size to content mode the width is too small. How can I make date/time panels always fit the content or (as workaround) is there any chance to add some fixed additional width to these panels (in size to content mode)? Thanks in advance, Christian

2 Replies

AR Anupama Roy Syncfusion Team February 20, 2006 10:48 AM UTC

Hi Christian, Sorry for the delay in response. I was not able to reproduce the above mentioned problem with our latest version.However, in your version,if the size to content mode is not working appropriately,please include the below given code snippet and call this function in the Form Load event. private void RecalculateSize() { int width = 0; Graphics g = CreateGraphics(); g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; width += g.MeasureString(this.statusBarAdvPanel1.GetText(),Font).ToSize().Width; this.statusBarAdvPanel1.ClientSize = new Size(width,this.statusBarAdvPanel1.Bounds.Height); g.Dispose(); } Please let me know if you have any questions. Thanks for your interest in Syncfusion products. Regards, Anu.


CR Christian Rattat February 21, 2006 05:30 AM UTC

Hi Anu, thanks for the hints. I have the same problem even in your original statusbar demo shipped with 3.0.1.0. However I changed the sizing mode to autosize=false and then used the measuring you suggested. Now it works as I want. Thanks! regards, Christian > >Hi Christian, > >Sorry for the delay in response. > >I was not able to reproduce the above mentioned problem with our latest version.However, in your version,if the size to content mode is not working appropriately,please include the below given code snippet and call this function in the Form Load event. > >private void RecalculateSize() > { > > int width = 0; > Graphics g = CreateGraphics(); > g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; > width += g.MeasureString(this.statusBarAdvPanel1.GetText(),Font).ToSize().Width; > this.statusBarAdvPanel1.ClientSize = new Size(width,this.statusBarAdvPanel1.Bounds.Height); > g.Dispose(); > } > >Please let me know if you have any questions. > >Thanks for your interest in Syncfusion products. > >Regards, > >Anu.

Loader.
Live Chat Icon For mobile
Up arrow icon