diff options
author | Robin Stocker | 2013-05-26 07:58:25 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-06-21 13:21:29 -0400 |
commit | 94fa45abcc62c6cb4ae4cf3f0bd6fc127328da1d (patch) | |
tree | ab8a1ab82958d8e284c3112e0f5600803cb39a84 | |
parent | e6b651e719700e0991aae8af1d8c1ecbcb3da24d (diff) | |
download | eclipse.platform.ui-94fa45abcc62c6cb4ae4cf3f0bd6fc127328da1d.zip eclipse.platform.ui-94fa45abcc62c6cb4ae4cf3f0bd6fc127328da1d.tar.gz eclipse.platform.ui-94fa45abcc62c6cb4ae4cf3f0bd6fc127328da1d.tar.xz |
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.java | 13 |
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. * |