Nevron Forum

how to catch rectangle shape lable keypress event or text change event? i.e. InPlaceEdit property

https://www.nevron.com/Forum/Topic3789.aspx

By Balasaheb Sherkar 1 - Tuesday, July 6, 2010

when inplaceedit is allowd to edit how to catch the lable or text of shapae is get changed.

please reply urgent. we are planning to purchase your diagram lib.

By Nevron Support - Tuesday, July 6, 2010

Hi,

You should subscribe to the PropertyChanged event of the document’s event sink service:

 

document.EventSinkService.NodePropertyChanged += new NodePropertyEventHandler(EventSinkService_NodePropertyChanged);

 

In the event handler you can use code similar to :

 

private void EventSinkService_NodePropertyChanged(NNodePropertyEventArgs args)

{

      if (args.PropertyName == "Text")

      {

            NLabel label = args.Node as NLabel;

            if (label != null)

            {

                  // Do what you need here

            }

      }

}