private void generalPrimaryVariableListBoxControl_MouseMove(object sender, MouseEventArgs e) { ListBoxControl listBoxControl = sender as ListBoxControl; int index = listBoxControl.IndexFromPoint(new Point(e.X, e.Y)); if (index != -1) { string item = listBoxControl.GetItem(index) as string; toolTipController1.ShowHint(item, listBoxControl.PointToScreen(new Point(e.X, e.Y))); } else { toolTipController1.HideHint(); } }
private void listBoxControlTables_MouseMove(object sender, MouseEventArgs e) { ListBoxControl listBoxControl = sender as ListBoxControl; int index = listBoxControl.IndexFromPoint(new Point(e.X, e.Y)); if (index != -1) { string item = (listBoxControl.GetItem(index) as DataRowView).Row[1] as string; toolTipController1.ShowHint(item, listBoxControl.PointToScreen(new Point(e.X, e.Y))); } else { toolTipController1.HideHint(); } }
private void MoveItem(ListBoxControl source, ListBoxControl target) { int sourceIndex = source.SelectedIndex; if (sourceIndex == -1) { return; } var selectedItem = source.GetItem(sourceIndex); if (selectedItem == null) { return; } (source.DataSource as List <string>).RemoveAt(sourceIndex); (target.DataSource as List <string>).Add(selectedItem.ToString()); source.Refresh(); target.Refresh(); }