Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic FONT Properties in BOX (Read 7068 times)
Ashish
Guest


FONT Properties in BOX
Sep 30th, 2005 at 2:13pm
Print Post  
Hi

I am using VB.NET file to use the FlowChartX ActiveX control. I add a reference to FLowChartX.

I created a box using createbox(,,,,)
I am able to use fillcolor, text and some other properties.

There are 2 uRGENT things which I am not able to do.

1. Tooltip does not work. I am using box.tooltip = "HELLO"

2. Not able to set font properties like name,size etc using box.font

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FONT Properties in BOX
Reply #1 - Sep 30th, 2005 at 3:21pm
Print Post  
Hi,

By default tooltips are disabled. Set the flowchart 's ShowToolTips property to true and they should display fine then.

Initially the Font property of all diagram items is null/nothing. That makes them draw their text using the flowchart's font. If you need to use a distinct font for a box, first assign to it a new OLE Font instance and you will be able to set the font's properties.

Stoyan
  
Back to top
 
IP Logged
 
Ashish
Guest


Re: FONT Properties in BOX
Reply #2 - Sep 30th, 2005 at 3:53pm
Print Post  
I have ShowToolTips set to true.
But it is still not working.

can u please tell me how can I set it to Ole font instance. I would like to get the lines of code as I have tried a lot of things and it does not work.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FONT Properties in BOX
Reply #3 - Sep 30th, 2005 at 5:16pm
Print Post  
Here is how to set the OLE font in VB.NET:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  fcx.ActiveBox.ToolTip = "test tooltip"

  fcx.ActiveBox.Text = "test font"
  fcx.ActiveBox.Font = New stdole.StdFontClass()
  fcx.ActiveBox.Font.Size = 33
End Sub

Tooltips should work fine when ShowTooltips = true, can you check whether there isn't another object over the one whose tooltip you set.
  
Back to top
 
IP Logged
 
Ashish
Guest


Re: FONT Properties in BOX
Reply #4 - Oct 2nd, 2005 at 2:36pm
Print Post  
I am still not able to resolve any of the issues. I am pretty confused but both these functionality are extremely IMPORTANT for me to implement.

1. ToolTip

fc.ShowToolTips = True
and
box.tooltip = "HELLO"

2. Font

mnRoot.Font = New stdole.StdFontClass
mnRoot.Font.Size = 33

it gives me an error
An exception occured : Loadfromstring()

Please HELP ME OUT
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FONT Properties in BOX
Reply #5 - Oct 2nd, 2005 at 3:50pm
Print Post  
So this is not VB.NET WinForms application, now I remember you use ASP.NET and IE.

LoadFromString can fail in several situations:

- the string passed to it is not created by SaveToString  or is mangled in some way
- the internal CRC fails, which might be caused again from a 'broken' string
- the version of the control on the client side is older than the one on the server side

So check whether the string is passed correctly and make sure the version on the client end is the same or newer than the one on the server.

Also make sure the FlowChartX editions used are the same, i.e. if you use the Pro edition on the server, use it on the client too. Here are the CLSIDs of Standard and Pro editions:

for the Standard edition:

<OBJECT id="fcx" height="100%" width="100%" classid="CLSID:E3866A1E-48C9-4381-A9E8-82AC3BDDA921" CODEBASE="yourFcCab.CAB#version=3,2,3,0">

Fro Pro edition:

<OBJECT id="fcx" height="100%" width="100%" classid="CLSID:F025BF4E-4081-4c02-86E6-6602AEE846F6" CODEBASE="yourFcCab.CAB#version=3,2,3,0">

Now if you believe there is a bug in LoadFromString, you can test it easy whether that's true by calling LoadFromString on the server side immediately after the SaveToString. If it fails again, then it's not a versioning issue since the same dll is used for sure.

Regarding tooltips, make sure ShowToolTips is set on the client side. E.g. set fc.ShowToolTips in a client side JavaScript. Anyway keep it set on the server too, I don't know whether its value is transferred by SaveToString/LoadFromString.
  
Back to top
 
IP Logged
 
Ashish Agarwal
Guest


Re: FONT Properties in BOX
Reply #6 - Oct 3rd, 2005 at 6:40pm
Print Post  
Hi

Versions are same.

The string gets broken though after using the font code lines.
Why does  this happen? and what could be the option?

Regarding Tooltip still surprised. Put it on clientside and still not working


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FONT Properties in BOX
Reply #7 - Oct 3rd, 2005 at 8:19pm
Print Post  
Hi,

Ok instead of SaveToString use SaveToFile and email the file to our support address so we can test that here with your settings. Do you have your application visible in the Internet by any chance ?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FONT Properties in BOX
Reply #8 - Oct 5th, 2005 at 8:34am
Print Post  
Ok, we found that ShowTooltips cannot be always enabled successfully on the server side, it seems the tooltip control cannot be created without UI. That makes ShowToolTips transferred as false to the browser. So if anyone experiences a similar problem, just set flowchart.ShowTooltips = true *after* calling LoadFromString on the client side.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint