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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing of a symbol label

Thread ID:

Created:

Updated:

Platform:

Replies:

25087 Feb 17,2005 04:40 PM UTC Feb 18,2005 09:50 PM UTC WinForms 1
loading
Tags: Diagram
Jose Santos
Asked On February 17, 2005 04:40 PM UTC

Hi, I want to be notified when a symbol label is changed. In order to do that I''ve make a class of mine inherited from symbol label and defined OnPropertyChangeEvent (and listening for the text property). The problem is that when I click now on a symbol it doesn''t let me change the text (and I''ve readonly set to false). (In some cases I can but I''ve to give a lot of clicks...It seems it selects the symbol and not the label, has something to do with bounds...) This is my code now: VDILabel vdiLabel = new VDILabel(this); AddLabel(vdiLabel); This is the previous code: Syncfusion.Windows.Forms.Diagram.Label lbl = this.AddLabel("Not defined yet", BoxPosition.Center); It should be exactly the same thing, no? Regards, Jose Santos

Administrator [Syncfusion]
Replied On February 18, 2005 09:50 PM UTC

Hi Jose, I will have to take a look at your SymbolLabel subclass and your implementation to determine the problem. I tried using a subclassed SymbolLabel type in the DynamicSymbol sample and the editing works as expected. The following is the code that I used, CustomSymbolLabel lbl = new CustomSymbolLabel(); this.AddLabel(lbl); lbl.Text = "Hello World"; lbl.Anchor = BoxPosition.Center; lbl.BackgroundStyle.Color = Color.Transparent; Please try to attach a small sample that shows the problem and I will take a look at it. But I am curious about why you require a subclass of the SymbolLabel to be notified of changes to the label text. All that is required is for you to handle the Diagram.Model.PropertyChanging/PropertyChanged events and examine whether the Node undergoing the change is a SymbolLabel and the property being changed is its ''Text''. The PropertyEventArgs will get you the new and old values of the text, and the SymbolLabel''s Container should fetch you the Symbol that is hosting the label. Regards, Prakash 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.

Warning Icon 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.Close Icon

;