Skip to content

Commit

Permalink
* ToolTip.cs: ShowAlways works at the form level, not at the control
Browse files Browse the repository at this point in the history
	level. Fixes #544565.

2009-11-11  Carlos Alberto Cortez <calberto.cortez@gmail.com>


svn path=/branches/mono-2-4/mcs/; revision=145938
  • Loading branch information
carlosalberto committed Nov 11, 2009
1 parent 7979db0 commit 354c980
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
@@ -1,3 +1,8 @@
2009-11-11 Carlos Alberto Cortez <calberto.cortez@gmail.com>

* ToolTip.cs: ShowAlways works at the form level, not at the control
level. Fixes #544565.

2009-11-11 Carlos Alberto Cortez <calberto.cortez@gmail.com>

* ButtonBase.cs: Usually the click routines are handled in Control,
Expand Down
12 changes: 3 additions & 9 deletions mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs
Expand Up @@ -869,17 +869,11 @@ private void ShowTooltip (Control control)
if (!is_active)
return;

// Display tooltips only for the controls in the active form
if (control.FindForm () != Form.ActiveForm)
// ShowAlways controls whether the controls in non-active forms
// can display its tooltips, even if they are not current active control.
if (!show_always && control.FindForm () != Form.ActiveForm)
return;

if (!show_always) {
IContainerControl cc = last_control.GetContainerControl ();
if ((cc == null) || (cc.ActiveControl == null)) {
return;
}
}

string text = (string)tooltip_strings[control];
if (text != null && text.Length > 0) {
if (active_control == null) {
Expand Down

0 comments on commit 354c980

Please sign in to comment.