HTML Document Viewer

I’m trying to do a couple of things with the doc viewer.

  1. I have scripted hyperlink events, and those work great. But, one thing I’m not sure of how to do is jumping to a specific place on the page. For instance, let’s say the document is 1000 lines long. On line 53, I have a link to something on line 700. How could I programatically jump or scroll down to line 700? Do I somehow have access to that property?

  2. I can’t seem to get tool tips to display. I have something entered into the Mouseover Text property, but it doesn’t show up. I was planning on progrommatically changing the text when the mouse floats over a link.

Ok, for the links that jump to a place on the same place you use named anchors.
So somewhere in your html you have:

<a name="jumphere">Jump to this section</a>

And else where you have a link like:

<a href="#jumphere">Click here to go to the other section</a>

And then you handle the hyperlink event like so. This code also has mouseover code that is working fine for me…

action = str(event.eventType) if 'ENTERED'==action: event.source.toolTipText=event.description if 'EXITED'==action: event.source.toolTipText=None if 'ACTIVATED'==action and event.description[0:1]=='#': event.source.viewport.view.scrollToReference(event.description[1:])

Hope this helps,

Ok, I’m missing something with the tool tips. I have this code:

if str(event.eventType) == "ENTERED":
	print event.eventType 
	event.source.toolTipText = 'Tool Tip'

I can see “ENTERED” in the console, and I see the mouseover text change to “Tool Tip” in the designer, but no tool tips appear on the screen. I tried tool tips with a few other components, and they are visible with buttons and drop down lists, but not tables or my doc viewer. Is there some other property that could affect this?

Ok, now I’m getting really weird behavior. I have no idea if this is related or not, but ever since I played around with the tool tips (manually typing something in the Mouseover Text property), I can’t set the cursor type anymore. Every control on my window now has the “W Resize” cursor (I didn’t change these), and I can’t change them back. If I highlight a control and try to change the cursor to “Automatic”, the selection reverts immediately back to “W Resize”. If I select “Default”, the selection will stay at default until I save the project, and then it reverts back to “W Resize” again.

What happened?

You’ve happened upon an odd but known issue, totally unrelated to your other issue. This happens when you save using CTRL-S in the Designer when your mouse is over the window’s border, giving the mouse a resize cursor. You’re going to have to set your components cursors back (all the way up the component hierarchy) and save again.

I’m not sure about your tooltip issue - haven’t reproduced it yet.

Wow, I never would have figured that out. I always use ctrl-s, so that’s definitely what happened. We’re back to normal now.

I’ve done everything I could to make tool tips work on my doc viewer and table, but no dice. I’ve attached a snapshot of the properties in case that helps.


I’ve attached a sample window that shows what I’m trying to do. There is a button that sets the text, and a label that shows the actual toolTipText. The button will create a html string with 20 lines, a bunch of blank lines, and 20 destination lines.

The label displays the mouseover text from the entered/exited events, but I still don’t see tool tips above the links. But, if I drag the mouse very slowly over the border of the doc viewer, the tooltip will appear for the width of the border. It could be my imagination, but it seems to be easier to get it to appear with a wider border (such as ‘beveled’) than a line border.

I’ve played around with the opaque property and the layering of the components, but nothing seems to work. Ideas?
Html_Window.fwin (11.8 KB)

I believe you, but you can see why I’m having trouble pinning this down. What version of Java are you running the client in?

From the designer: Java Version: Sun Microsystems Inc. 1.6.0_12

I just tried it on another computer with Java version 1.6.0_04 and got the same results. Both pcs are running FPMI v 3.3.1 Build 2549.

Well FWIW, I’m on 1.6.0_13 and FactoryPMI 3.3.2

Well, I updated FPMI to 3.3.2, and now it’s working. I left Java alone since I have it set on auto update anyway. We’re back in business.

Huh, well, glad its working, although I’m hard pressed to find any differences between 3.3.1 and 3.3.2 that should affect this…