Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Tabulation and RichText when editing ShapeNode (Read 2993 times)
Lenny_Master
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jul 21st, 2014
Tabulation and RichText when editing ShapeNode
Jul 23rd, 2014 at 2:12pm
Print Post  
Hi, I have two questions,
At first. I have troubles when editing a ShapeNode. If I press the TAB key, I get lost the focus. I want to stay on the editor with a printed TAB.
In the other hand, I need to add some RichText to the control. I try to add it setting EnableStyledText and PolygonalTextLayout in true, but it only works with pre-charged text, the user don't know HTML tags, so it's unuseful. Is there a toolbar or a workaround to solve this stuff.?

Thanks in Advance, Leonardo
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tabulation and RichText when editing ShapeNode
Reply #1 - Jul 23rd, 2014 at 3:38pm
Print Post  
Hi,

Handle the EnterInplaceMode event and set the AcceptTabs property to make the textbox accept tabs:

Code
Select All
private void diagramView_EnterInplaceEditMode(object sender, InPlaceEditEventArgs e)
{
	diagramTextBox = (TextBox)e.EditControl;
	diagramTextBox.AcceptsTab = true;
} 



You could create a user control containing textbox and toolbar for formatting text to use as an editor, and show it from DiagramView.CreateEditControl event handler. You could probably use a RichText control as an editor too, but will have to convert from RTF to HTML format when assigning the node text.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Lenny_Master
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jul 21st, 2014
Re: Tabulation and RichText when editing ShapeNode
Reply #2 - Jul 23rd, 2014 at 8:53pm
Print Post  
Hi Stoyo, very useful you answer, but...

The TAB is working now, but when I get the focus out, the text don't looks like a tabbed one.

Please, see the attachment.

Thanks
  

shapenode_tabs.JPG (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tabulation and RichText when editing ShapeNode
Reply #3 - Jul 24th, 2014 at 4:45am
Print Post  
Hi Leonardo,

At this time the control just leaves larger white space for tabs and does not align them in columns. If you need to display tabular data, try using TableNodes.

Stoyan
  
Back to top
 
IP Logged
 
Lenny_Master
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jul 21st, 2014
Re: Tabulation and RichText when editing ShapeNode
Reply #4 - Jul 25th, 2014 at 3:42pm
Print Post  
Thanks, Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint