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 12:15 PM UTC

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 08:05 PM UTC

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





SG Shyam G Syncfusion Team November 22, 2019 03:55 AM UTC

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


Loader.
Up arrow icon