I'm tracking down the "Changed" event of combo box, which notifies whenever
the user changes his selection. The idea is to only execute the code, if the
user clicks and selects from the box; and _not_ when the program itself does
the selection (like, combobox1.Active = 5).

The relevant section of the code is:

combobox1.Changed += new EventHandler(OnPrivacyChanged);
private void OnPrivacyChanged(object o, EventArgs args) {
  if (!combobox1.IsFocus) return;

 // run code

 Console.WriteLine("change privacy only when user selects from the box");
}


However, there's some problem with IsFocus, it always gives false,
irrespective of whether the user clicks on the box, or not. Because of that,
the code is never executed. Is there some way around it?
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to