> It would be possible to derive a tooltip class from 
> qx.ui.popup.ToolTip which overrode _beforeAppear and used the
> current mouse coordinates (qx.event.type.MouseEvent.getClientX()
> etc) to ask the widget what the label and icon should be for the
> tooltip, maybe via an event interface.

This is basically OK. I've used getBoundToWidget() in the overridden
tooltip _beforeAppear and called the function getToolTipLabel if the
function is defined. My proof of concept is:

      getToolTipLabel : function(oToolTip)
         {
return("x=" + qx.event.type.MouseEvent.getClientX() + ", y=" +
qx.event.type.MouseEvent.getClientY());
         }
         
I have to call this._atom.setLabel() with the return result.

A few issues with it: 

The tooltip won't reappear until the mouse is moved out of the table and
then back into it again. This is because once a tooltip has appeared, it
isn't shown again. A different tooltip has to be set into the manager.

Therefore more complex processing of the mouse movement is required,
remembering where it was and determining if another table cell has been
hit. If that happens, a simple call to
qx.ui.popup.ToolTipManager.getInstance().setCurrentToolTip(null); is all
that's needed to let the tooltip come up again.
 
We might want to limit tooltips so that they are only shown for table
cells that are truncated. Therefore a way of suppressing the tooltip is
needed, maybe by setting a label value that is empty. We also need a way
of determining truncated cells. 

I haven't looked into these issues yet.
 
Hugh

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to