Hi there,

I currently need to display tool-tips on disabled buttons (widgets) to show the
user the reason why this button is (currently) disabled.

This has been asked a while ago[1] but with no result.


I currently have to apply a patch to the framework because the display is
handled by a singleton handler, so deriving does not make any sense here. But
patching the framework is only "a last resort"...

I would propose the following changes:

a) qx.ui.core.Widget
   =================
   Add a property "showToolTipWhenDisabled" (we can discuss the name of
   this property of course ;) )

b) qx.ui.tooltip.Manager
   =====================
   Change the code in showToolTip method that prevents tool-tip display
   (line 326):
   <code>
          || (!target.getEnabled() && !target.isShowToolTipWhenDisabled() )
   </code>

These changes would not change the behavior of the other tool-tip related
properties I hope (see playground[2] example, too)

Attached you will find a patch (Version 3.0.2 based) for easier overview.

I hope this can find it's way into the framework.
I will do the work of issuing the enhancement bug of course ;)

Regards,
  Peter


[1]
http://qooxdoo.678.n2.nabble.com/Tooltips-and-disabled-buttons-tp5693574p5693574.html
[2] http://tinyurl.com/kxw8yrc

-- 

-- 
*************************************************************************
Treffen Sie TIS am Dienstag, dem 26. November auf der Fachtagung der SVG 
in Mannheim. Auf der Veranstaltung werden bewährte und neue Methoden des 
Fuhrparkmanagements vorgestellt und anhand von konkreten Beispielen in 
der Praxis diskutiert.
http://www.tis-gmbh.de/de/news/artikel/der-lkw-fuhrpark-im-unternehmen
*************************************************************************
Index: core/Widget.js
===================================================================
diff --git a/branches/branch_3_0_x/framework/source/class/qx/ui/core/Widget.js 
b/branches/branch_3_0_x/framework/source/class/qx/ui/core/Widget.js
--- a/branches/branch_3_0_x/framework/source/class/qx/ui/core/Widget.js 
(revision 59714)
+++ b/branches/branch_3_0_x/framework/source/class/qx/ui/core/Widget.js 
(working copy)
@@ -595,7 +595,16 @@
       init : false
     },
 
+    /**
+     * Controls if a tooltip should be shown even when the widget is disabled.
+     */
+    showToolTipWhenDisabled :
+    {
+      check : "Boolean",
+      init : false
+    },
 
+
     /*
     ---------------------------------------------------------------------------
       MANAGEMENT PROPERTIES
Index: tooltip/Manager.js
===================================================================
diff --git 
a/branches/branch_3_0_x/framework/source/class/qx/ui/tooltip/Manager.js 
b/branches/branch_3_0_x/framework/source/class/qx/ui/tooltip/Manager.js
--- a/branches/branch_3_0_x/framework/source/class/qx/ui/tooltip/Manager.js     
(revision 59714)
+++ b/branches/branch_3_0_x/framework/source/class/qx/ui/tooltip/Manager.js     
(working copy)
@@ -323,7 +323,7 @@
       //do nothing if
       if (!target //don't have a target
           // tooltip is disabled
-          || !target.getEnabled()
+          || (!target.getEnabled() && !target.isShowToolTipWhenDisabled() )
           //tooltip is blocked
           || target.isBlockToolTip()
           //an invalid message isn't set and tooltips are disabled
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to