Listbox not always triggering CLICK event (OpenInsight 16-Bit Specific)
At 20 JAN 2006 03:25:58PM Fred Dietrich wrote:
We have a listbox in our medical software that doesn't always call its CLICK event when clicked. Here's how it works. The user selects a charge ID from a popup. The popup returns the ID into an editline. Beneath the editline, is a listbox containing all diagnoses that the patient has. The user can associate any number of these with the charge ID. He or she then clicks the Add button and it adds the charge ID and diagnoses association to an edit table farther down in the window.
Have you followed all of that so far?
The tricky part is that we track not only which diagnoses were selected but WHAT ORDER they were selected in. Each time the diagnosis listbox's Click event is called, the selected item is placed appended to an array stored in an invisible field. This invisible field keeps track of the order in which the selections were made. Upon clicking the Add button, the charge ID along with all of the items in this invisible field are passed down to the lower edit table.
Still with me?
The problem is that the when the user works quickly, the clicks on the diagnosis listbox don't always call the CLICK event. The result is that not all of the diagnoses selected get into the invisible field and therefore they don't get into the edit table. Does anybody know why a listbox might not trigger a CLICK event?
At 23 JAN 2006 04:03AM Simon G Wilmot wrote:
Is it possible that the original window has not received focus back correctly from the popup ?? I have had similar behaviour following a message call. Maybe reset the focus after the popup call …
Can you test if the missing ones are always following a particular user action ??
Simon