Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Manage multiple lines textstyle (Read 6731 times)
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Manage multiple lines textstyle
Jan 10th, 2014 at 1:40pm
Print Post  
Hello,

Firstly have an happy new year.

Here is my question.

I want to manage the multiline textstyle of a box (tsCenterML).

What is the best way to have a line feed where I want (what separator for example) ?


Same question for the JDiagram version.

Regards

Juan






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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Manage multiple lines textstyle
Reply #1 - Jan 10th, 2014 at 1:57pm
Print Post  
Happy new year! If you are using the control from VB, use the vbCrLf constant:
node.Text = "line 1" + vbCrLf + "line 2"

In C-like languages and for JDiagram use the \r\n escape sequence:
node.setText("line 1\r\nline 2");

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


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: Manage multiple lines textstyle
Reply #2 - Jan 10th, 2014 at 2:01pm
Print Post  
Does the

Ocx_Flowchart.MeasureString  function count the crlf characters ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Manage multiple lines textstyle
Reply #3 - Jan 10th, 2014 at 2:21pm
Print Post  
FlowChart.MeasureString calls Win32 GetTextExtentPoint32 function which does not seem to count multiple lines. Instead, you could use a temporary node to measure text by calling its FitSizeToText method.
  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: Manage multiple lines textstyle
Reply #4 - Jan 10th, 2014 at 2:58pm
Print Post  
Thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint