mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-15 18:03:01 +12:00
[BUG] Fix not scrolled to searched item (#398), version 1.2.9.18
This commit is contained in:
parent
f5b29b43cd
commit
7afcb95f5c
|
@ -77,7 +77,6 @@ namespace SystemTrayMenu.Business
|
|||
}
|
||||
|
||||
AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); });
|
||||
menus[0].ResetSearchText();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1028,8 +1027,7 @@ namespace SystemTrayMenu.Business
|
|||
|
||||
if (menu.Level == 0)
|
||||
{
|
||||
DataGridView dgv = menu.GetDataGridView();
|
||||
((DataTable)dgv.DataSource).DefaultView.RowFilter = "[SortIndex] LIKE '%0%'";
|
||||
menu.ResetSearchText();
|
||||
AdjustMenusSizeAndLocation();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,11 @@ namespace SystemTrayMenu.Handler
|
|||
this.dgv = dgv;
|
||||
this.rowIndex = rowIndex;
|
||||
RowData rowData = (RowData)dgv.Rows[rowIndex].Cells[2].Value;
|
||||
rowData.IsSelected = true;
|
||||
if (rowData != null)
|
||||
{
|
||||
rowData.IsSelected = true;
|
||||
}
|
||||
|
||||
dgv.Rows[rowIndex].Selected = false;
|
||||
dgv.Rows[rowIndex].Selected = true;
|
||||
}
|
||||
|
|
|
@ -234,6 +234,8 @@ namespace SystemTrayMenu.UserInterface
|
|||
internal void ResetSearchText()
|
||||
{
|
||||
textBoxSearch.Text = string.Empty;
|
||||
dgv.FirstDisplayedScrollingRowIndex = 0;
|
||||
AdjustScrollbar();
|
||||
}
|
||||
|
||||
internal void FocusTextBox()
|
||||
|
|
Loading…
Reference in a new issue