private void tooltipTimer_Tick(object sender, EventArgs e) { tooltipTimer.Stop(); int yIndex = lastMouseCoords.Y.RoundDown(CharHeight) / CharHeight; if (yIndex >= Lines.Count | yIndex >= _list.Count) { return; } if (iCharFromPoint(lastMouseCoords) >= Lines[yIndex].Length) { return; } string str = TokenFromPoint(lastMouseCoords).Text.TrimStart(); if (!String.IsNullOrEmpty(str)) { ACMD_CMD_INFO cmi; if ((cmi = CommandDictionary.FirstOrDefault(x => x.Name.StartsWith(str))) != null) { if (cmi.EventDescription == "NONE") { return; } toolTip.ToolTipTitle = cmi.Name; toolTip.ToolTipDescription = cmi.EventDescription; toolTip.Show(cmi.Name, this, lastMouseCoords, 5000); } } }
private void TtTimer_Tick(object sender, EventArgs e) { timer.Stop(); ACMD_CMD_INFO info = SelectedItem as ACMD_CMD_INFO; var itemRect = GetItemRectangle(SelectedIndex); tooltip.ToolTipTitle = info.Name; tooltip.ToolTipDescription = info.EventDescription; tooltip.Show(info.Name, this, this.Right, itemRect.Y, 5000); }
/// <summary> /// Shows the tooltip /// </summary> public void Show() { ttp.Show(); }