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.
Unfortunately, activation email could not send to your email. Please try again.

SymbolLabel size not recalculated after font modification

Thread ID:

Created:

Updated:

Platform:

Replies:

34538 Sep 12,2005 11:11 AM Sep 15,2005 09:51 AM Windows Forms 4
loading
Tags: Diagram
Richard Deverson
Asked On September 12, 2005 11:11 AM

Hello, Still on the subject of symbol labels, sorry. I add a label to a Symbol, then I manipulate the label text properties, e.g. font size, style etc. Unless I force a "SizeToText" on the Symbol, the symbol will not be resized according to the new text properties, and the text may be truncated. Is this the intended behaviour? See code below: SymbolLabel symbolLabel = this.AddLabel(text,BoxPosition.MiddleRight) as SymbolLabel; //this is subclassed from Symbol if(null != symbolLabel) { //Set some defaults symbolLabel.OffsetX = 10; symbolLabel.OffsetY = 0; symbolLabel.FontStyle.Family = "Verdana"; symbolLabel.FontStyle.PointSize = 8.25F; symbolLabel.VerticalAlignment = StringAlignment.Center; symbolLabel.HorizontalAlignment = StringAlignment.Center; symbolLabel.DirectionRightToLeft = false; symbolLabel.NoClip = true; symbolLabel.WrapText = false; //What we DO have to do is manually force a resize of the symbol label, because some //text properties have changed. symbolLabel.SizeToText(); } regards Richard

Richard Deverson
Replied On September 12, 2005 11:13 AM

PS. Forgot to mention, The symbol size is automatically recalculated if the SymbolLabel.Text is modified again after playing with the font etc. And this is all with V3.3.0.0 regards Richard

Administrator [Syncfusion]
Replied On September 12, 2005 11:53 AM

Richard, Calling SymbolLabel.SizeToText() should do the trick. Are you having trouble with this? Thanks, Prakash Surendra Syncfusion Inc.,

Richard Deverson
Replied On September 13, 2005 04:56 AM

Hi Prakash, Yes, SizeToText works fine, and I can live with it as is. My question was just whether the SizeToText should be done within the label class itself, e.g. whenever a font property is changed. regards Richard

Administrator [Syncfusion]
Replied On September 15, 2005 09:51 AM

Richard, You are right about this. I will go ahead and log a QA report, and we will try to address the problem in a future update of the product. As always, thank you for bringing the issue to our attention. Regards, Prakash Surendra Syncfusion Inc.

CONFIRMATION

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.

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.

;