Sorry, addHoverHandler() is the SmartGWT method name, handleHover (which your code sample now uses) is the correct method to use in SmartClient.
You are showing your own HTMLFlow widget, so updateHover() does not apply. This would update the hover text if you were using the built-in hover widget.
You need to instead keep a reference to the HTMLFlow widget you've created, so you can later call setContents() on it to modify it's content.
And of course, you need to decide on an approach for when/how the user dismisses this custom hover, and implement that.
Announcement
Collapse
No announcement yet.
X
-
Originally posted by Isomorphic View PostThe "prompt" functionality is just an ordinary browser tooltip, which is not extensible in the way you hope.
You can use Canvas-level hover APIs, such as addHoverHandler(), to get basic hover events which would allow you to create your own hover widget. Then you could implement some means of dismissal for the hover which would allow it to be interacted with instead of disappearing immediately.
If I understand the above suggestion, I have following definition:
Code:isc.Window.create({ ID: "myWindow", showFooter: true, showStatusBar: true, footerProperties: { handleHover: function() { return isc.HTMLFlow.create({ contents: "test" }); } } })
Code:myWindow.footer.updateHover("new hover text");
Could you please give me more hints. Thanks for your help.
Leave a comment:
-
The "prompt" functionality is just an ordinary browser tooltip, which is not extensible in the way you hope.
You can use Canvas-level hover APIs, such as addHoverHandler(), to get basic hover events which would allow you to create your own hover widget. Then you could implement some means of dismissal for the hover which would allow it to be interacted with instead of disappearing immediately.
Leave a comment:
-
How to make Hover/Prompt text selectable, so that I can copy the hovering tooltip
I'm using window.footer.setPrompt("prompt text") to display a tooltip when hovering on the window footer.
Is there a way that I can make the hover pop up box stay focused so that I can copy the text in the pop up box. Currently, the pop up box will be automatically disappeared when the mouse cursor goes out of the window footer area.
ThanksTags: None
Leave a comment: