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.