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

prevent double click on bitmap node

Hi
I am using diagram and I add many type of nodes
When I double click on a node, an inline text editor appears (see attached)
I would like to not show this editor in case of a bitmap node

Regards

Attachment: InlineEditing_7a8b9f54.7z

3 Replies

SG Shyam G Syncfusion Team November 21, 2019 07:15 AM

Hi George, 
 
To disable the inline text editor, please set inPlaceEditing as false in NodeMouseEnter event to achieve your requirement. Please refer to a code example and sample below. 
 
Code example: 
public Form1() 
        { 
             //define event 
            this.diagram1.EventSink.NodeMouseEnter += EventSink_NodeMouseEnter; 
            this.diagram1.EventSink.NodeMouseLeave += EventSink_NodeMouseLeave; 
        } 
 
        private void EventSink_NodeMouseLeave(NodeMouseEventArgs evtArgs) 
        { 
            this.diagram1.Controller.InPlaceEditing = true; 
        } 
 
        private void EventSink_NodeMouseEnter(NodeMouseEventArgs evtArgs) 
        { 
            //check the condition whether node is Bitmap 
            if(evtArgs.Node is BitmapNode) 
            { 
                this.diagram1.Controller.InPlaceEditing = false; 
            } 
        } 
 
 
 
 
Regards, 
Shyam G 



GE George November 21, 2019 03:05 PM

Thank you very much for the quick reply.
It worked perfectly





SG Shyam G Syncfusion Team November 21, 2019 10:55 PM

Hi George, 
Thanks for your update. 
Regards, 
Shyam G 


Loader.
Live Chat Icon For mobile
Up arrow icon