******************************************************************** * Description.......: List1.Click() * Calling Samples...: * Parameter List....: * Created by........: MDA * Modified by.......: Nadya Nosonovsky 03/14/2000 05:40:14 PM ******************************************************************** * 9/26/99: added refresh/cascade logic here, because the When & GotFocus events don't see * certain changes, e.g. some cases of unselecting a previously selected list item. * Use of LostFocus helped, but the effect is delayed until user changes focus to another * control, so it's still not entirely satisfactory. * * Note that we may be refreshing more than necessary in most cases, but I'm trying to * fix problems with cases that are otherwise missed altogether. Further optimization can wait. *this.parent.parent.AllowWhen=.t. this.when() && invoke the same logic used by When, but after change becomes visibleWhen event:
******************************************************************** * Description.......: List1.When() * Calling Samples...: * Parameter List....: * Created by........: MDA * Modified by.......: Nadya Nosonovsky 03/15/2000 01:06:07 PM ******************************************************************** * 8/4/99: keep Clear button disabled if list is already cleared. * Adapted from preliminary logic for handling the Counties listbox. * 8/7/99: added tie-in to new btc_cascade method, for propagating changes as necessary. * 9/26/99: trying to debug problems with failure to detect un-selection in some cases. * * Unfortunately, there's no way to be more selective about this logic, because * VFP doesn't trigger any more specific event when an item is selected or unselected. * force related refreshes to handle changes in the choice of selections with this.parent.parent this.parent.Command1.refresh() && handles button enablement/disablement if .HasDependants .btc_cascade() && force re-init of any dependent controls endif endwithIt also has custom refresh method, but it doesn't relevant here.
******************************************************************** * Description.......: Command1.Refresh * Calling Samples...: * Parameter List....: * Created by........: MDA * Modified by.......: Nadya Nosonovsky 01/18/2000 10:51:39 AM ******************************************************************** * 8/4/99: keep Clear button disabled if list is already cleared. * Adapted from preliminary logic for handling the Counties listbox. if this.parent.parent.visible this.enabled = this.parent.enabled ; and (!empty(this.parent.parent.btc_itemlist()) or this.parent.parent.AllSelected) endifHTH