Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Not clear with EnableStyledText (Read 2586 times)
rcruzmar
YaBB Newbies
*
Offline



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Not clear with EnableStyledText
Feb 14th, 2008 at 4:46pm
Print Post  
Hi,

I am having difficulties with the EnableStyledText Property. The problem is that the Styled text does not display. the text is displeyed with the HTML-like tags displayed.

Here is a sample of what I am coding:

[code]
BoxItemStruct.boxItem = m_FlowCtrl.CreateBox(8, 8, 352, 320);
BoxItemStruct.boxItem.SetTextStyle(tsFitPolyBottom);
BoxItemStruct.boxItem.SetEnableStyledText(TRUE);
BoxItemStruct.boxItem.SetStyle(bsShape);
BoxItemStruct.boxItem.SetText("H<b>2</b>O"); //"<b>"+BoxItemStruct.strText+"<\b>");[/code]

This is almost a direct copy of the sample shown in the online help file.

Any ideas? Am I using an older version of the FlowChart ActiveX control?

Thanks for your help.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Not clear with EnableStyledText
Reply #1 - Feb 14th, 2008 at 5:01pm
Print Post  
Hi,

I have pasted this in the "Text and Fonts" sample project and it worked fine.

Code
Select All
b = fcx.CreateBox(8, 8, 352, 320);
b.SetTextStyle(tsFitPolyBottom);
b.SetEnableStyledText(TRUE);
b.SetStyle(bsShape);
b.SetText(_T("H<b>2</b>O")); //"<b>"+BoxItemStruct.strText+"<\b>");
 



Could you try that?

Stoyan
  
Back to top
 
IP Logged
 
rcruzmar
YaBB Newbies
*
Offline



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Re: Not clear with EnableStyledText
Reply #2 - Feb 14th, 2008 at 5:45pm
Print Post  
Unfortunately this did not work. Below is an except of the code I copied and pasted from the Text and Fonts sample into my program.

Code
Select All
// Create box replica
CFontHolder fh6(NULL);
CY fsize;

fsize.int64 = 80000;
fh6.InitializeFont();
BoxItemStruct.boxItem = m_FlowCtrl.CreateBox(8, 8, 352, 320);
BoxItemStruct.boxItem.SetFont(fh6.GetFontDispatch());
BoxItemStruct.boxItem.GetFont().SetName(_T("Tahoma"));

fsize.int64 = 100000;
BoxItemStruct.boxItem.GetFont().SetSize(fsize);
BoxItemStruct.boxItem.SetTextStyle(tsFitPolyBottom);
BoxItemStruct.boxItem.SetEnableStyledText(TRUE);
BoxItemStruct.boxItem.SetStyle(bsShape);

// Set values from the edited boxItem
BoxItemStruct.boxItem.SetText(_T("H<sub>2</sub>O"));
 



I am not able to display the text within the box with the Styled Text enabled. Could I have an older version of the Flow Chart control?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Not clear with EnableStyledText
Reply #3 - Feb 14th, 2008 at 5:55pm
Print Post  
But doesn't it work when you paste that in Text&Fonts and run the sample? If it works, compare the differences between your flowchart's properties and the ones in the sample. Also check whether your application isn't changing the box style at some point later.

Stoyan
  
Back to top
 
IP Logged
 
rcruzmar
YaBB Newbies
*
Offline



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Re: Not clear with EnableStyledText
Reply #4 - Feb 14th, 2008 at 5:58pm
Print Post  
GOT IT TO WORK!!!!  Grin

The Text style was resetting to something else later in the code! Had I seen this before we would not have this conversation.

May this be a reminder to others to check their codes!!!

As always, thanks for your help and effort.

Rolando
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint