aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2013-05-26 07:58:25 (EDT)
committerDani Megert2013-08-22 07:01:31 (EDT)
commit6983bd4150478e51016d826fe7f9489a17a36368 (patch)
tree658276ede573de2bbc581dfb38894975deb7c4fc
parent68e5bff4d7d5b9d69c5ad0eed8617d17c3ee8d10 (diff)
downloadeclipse.platform.ui-6983bd4150478e51016d826fe7f9489a17a36368.zip
eclipse.platform.ui-6983bd4150478e51016d826fe7f9489a17a36368.tar.gz
eclipse.platform.ui-6983bd4150478e51016d826fe7f9489a17a36368.tar.bz2
Bug 193034 - [Forms] Section should also set tooltip on text
Before this, the tooltip would only show when hovering over the section background where there is no text. With this, the tooltip is also shown when hovering over the title text. Signed-off-by: Robin Stocker <robin@nibor.org>
-rw-r--r--bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
index c96d79a..51d3bd8 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
* Kai Nacke - Fix for Bug 202382
* Bryan Hunt - Fix for Bug 245457
* Didier Villevalois - Fix for Bug 178534
+ * Robin Stocker - Fix for Bug 193034 (tool tip also on text)
*******************************************************************************/
package org.eclipse.ui.forms.widgets;
@@ -828,6 +829,16 @@ public class ExpandableComposite extends Canvas {
layout();
}
+ public void setToolTipText(String string) {
+ super.setToolTipText(string);
+ // Also set on label, otherwise it's just on the background without text.
+ if (textLabel instanceof Label) {
+ ((Label) textLabel).setToolTipText(string);
+ } else if (textLabel instanceof Hyperlink) {
+ ((Hyperlink) textLabel).setToolTipText(string);
+ }
+ }
+
/**
* Returns the title string.
*