Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) InPlaceEditing not showing textbox automatically (Read 7937 times)
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
InPlaceEditing not showing textbox automatically
Nov 6th, 2013 at 11:34am
Print Post  
Hi,

In my Diagram class I have set AllowInplaceEdit = True. This does allow me to edit the Text in nodes but it doesn't show a textfield when I double click the node. How can I fix this?

Notes:
- The Diagram is in a ScrollViewer and I have set ScrollViewer.Focusable = False
- The nodes are custom nodes with override to Draw()

Thanks in advance!

Vincent
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InPlaceEditing not showing textbox automatically
Reply #1 - Nov 6th, 2013 at 12:23pm
Print Post  
What do you mean by "This does allow me to edit the Text in nodes but when it doesn't show a textfield when I double click the node" - does it show the textbox only for some nodes?
  
Back to top
 
IP Logged
 
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
Re: InPlaceEditing not showing textbox automatically
Reply #2 - Nov 6th, 2013 at 12:30pm
Print Post  
When I double click a node, the appearance of the node (with or without text) stays the same. When I type something and click outside the node's bounds the text appears.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InPlaceEditing not showing textbox automatically
Reply #3 - Nov 6th, 2013 at 1:46pm
Print Post  
The textbox shows correctly if I enable AllowInplaceEdit in the project you attached to this thread:
http://mindfusion.eu/Forum/YaBB.pl?num=1382359395

If you still keep the MeasureOverride from http://mindfusion.eu/Forum/YaBB.pl?num=1383232837, remove it. It's not correct because it does not propagate to child elements, including the in-place TextBox. Or otherwise add a call to base to process the children too.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
Re: InPlaceEditing not showing textbox automatically
Reply #4 - Nov 6th, 2013 at 2:13pm
Print Post  
I downloaded the project you mentioned and tried it but it doesn't seem to work Huh

In my project I didn't implement the measure override.

When I set MagnifierEnabled to true it does seem to work for some reason. However, when I do set that property I can't access the ContextMenu of the nodes. How can I get the textfield without setting the MagnifierEnabled? I added my project as an attachment.

Thanks in advance!

Vincent
  

DragDropExample_-_Copy_003.zip (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InPlaceEditing not showing textbox automatically
Reply #5 - Nov 7th, 2013 at 7:51am
Print Post  
The TextBox appears as expected when I run this project. In case it doesn't show for you because of incomplete WPF layout phase, try calling diagram.UpdateLayout or e.TextBox.UpdateLayout from the EnterInplaceEditMode event handler.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
Re: InPlaceEditing not showing textbox automatically
Reply #6 - Nov 7th, 2013 at 2:01pm
Print Post  
Doesn't work unfortunately. My code is:

Code
Select All
private void MC_Diagram_EnterInplaceEditMode(object sender, InPlaceEditEventArgs e)
        {
            e.TextBox.UpdateLayout();
            this.UpdateLayout();
        }
 

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InPlaceEditing not showing textbox automatically
Reply #7 - Nov 7th, 2013 at 4:17pm
Print Post  
What version of the control are you using?
  
Back to top
 
IP Logged
 
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
Re: InPlaceEditing not showing textbox automatically
Reply #8 - Nov 8th, 2013 at 11:49am
Print Post  
2012.R2
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InPlaceEditing not showing textbox automatically
Reply #9 - Nov 8th, 2013 at 12:21pm
Print Post  
That's version 3.0.1 of the diagramming.dll if you look in the reference property window, right? Your project works for me if I compile it with 3.0.1 too though.

Could you check if you can see the edit box in the installed SequenceDiagram.exe sample from the StartMenu/Wpf Pack/Diagram/Samples shortcut? If it’s ok, check if it still works if you compile the sample on your system from the installed VS solution.
  
Back to top
 
IP Logged
 
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
Re: InPlaceEditing not showing textbox automatically
Reply #10 - Nov 8th, 2013 at 3:04pm
Print Post  
The sample project works when I compile it in the VS installed on my computer. I guess it must be something in my project..  Huh
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InPlaceEditing not showing textbox automatically
Reply #11 - Nov 8th, 2013 at 4:15pm
Print Post  
Could you upload somewhere the zipped bin/debug folder from your compiled DragDropExample project, or send it to our support email address?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InPlaceEditing not showing textbox automatically
Reply #12 - Nov 11th, 2013 at 9:58am
Print Post  
We tried it on several systems, and apparently the textbox does not show when running under .NET 4.5 on Windows 8. .NET 4.5 under Windows 7 is ok. If we rebuild the sample with .NET 3.5 as target framework (using respective .NET 3.5 diagram assemblies), it starts to work on 8 too. Our developers will investigate this in the next days, for the time being you can build for .NET 3.5.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
Re: InPlaceEditing not showing textbox automatically
Reply #13 - Nov 11th, 2013 at 2:42pm
Print Post  
Ahh, I was running .NET 4.5 on Windows 8 indeed. And changing the target framework to .NET 3.5 fixed it as well. Thanks for the info! Smiley

Vincent
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: InPlaceEditing not showing textbox automatically
Reply #14 - Dec 18th, 2013 at 7:45am
Print Post  
With this version the edit control should show correctly under .NET 4.5 + Windows 8 too:
https://mindfusion.eu/_beta/wpfdiag304.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint