Profile Picture

MouseHover Event and the NNumericUpDown control

Posted By Miles Thornton 14 Years Ago
Author
Message
Miles Thornton
questionmark Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 17, Visits: 1

I have a need to have my NNumericUpDown controls display a ToolTip specific to each one of them; but there is apparently no MouseHover Event... Am I missing something or is the functionality just not available?

I tried hooking up the NToolTip to the MouseClick, OnEnter Events - but, that doesn't seem to work:

private void nnud_Enter(object sender, EventArgs e)

{ // The ToolTip Text to display is held by each NNumericUpDown's Tag property:

int length = ((Nevron.UI.WinForm.Controls.NNumericUpDown)sender).Text.Length;

((Nevron.UI.WinForm.Controls.NNumericUpDown)sender).Select(0, length);

nttFixturesToolTipForNNUDs.Content.Text = ((Nevron.UI.WinForm.Controls.NNumericUpDown)sender).Tag.ToString();

nttFixturesToolTipForNNUDs.SetTooltip(((Nevron.UI.WinForm.Controls.NNumericUpDown)sender));

nttFixturesToolTipForNNUDs.ShowDelay = 10;

nttFixturesToolTipForNNUDs.HideDelay = 1000;

}

private void nnudFixtures_MouseClick(object sender, MouseEventArgs e)

{

EventArgs a = new EventArgs();

nnud_Enter(sender, a);

}

Thanks,

-Miles



Angel Chorbadzhiev
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hi Miles,

You should separately attach to the following events:

nNumericUpDown1.Controls[0].MouseEnter += new EventHandler(upDownButtons_MouseEnter);

nNumericUpDown1.Controls[1].MouseEnter += new EventHandler(editBox_MouseEnter);

... and in the event handlres to set to tooltip to the respective controls.

Regards,

Angel.





Similar Topics


Reading This Topic