I am developing a DLL which is loaded into a Tab page in a Enteprise application.
A ListBox control (single select) has an event on listBox_SelectedValueChanged where the use choosed between different "Display Styles" which when changes fires a sub-routine to reload a DataViewGrid control with different information. Code is below for this:
private void listBox_SelectedValueChanged(object sender, EventArgs e)
{
MessageBox.Show("LBSVC Value:" + listBoxDisplayStyles.SelectedValue + " -- Index:" + listBoxDisplayStyles.SelectedIndex);
if (listBoxDisplayStyles.SelectedValue != null)
PatientChanged(true); // true = force a refresh
}
Now inconsistently when finished interacting with DGV control (no editing, just scrolling and ToolTip triggering to show extended information on the cells) I move the mouse back over the listbox control and click a different line to. The new listbox line becomes current (selection bar appears), but the event does not seem to be triggered (ie the MessageBox does not appear and nothing happens.