>******************************************************************** >* Description.......: List1.Refresh() >* Calling Samples...: >* Parameter List....: >* Created by........: MDA >* Modified by.......: Nadya Nosonovsky 01/18/2000 10:47:56 AM >******************************************************************** >* 8/4/99: support pseudo-disablement of listbox. >* Adapted from preliminary logic for handling the Counties listbox. >* 8/5/99: use alternate color (red) to distinguish exclusion from selection (blue). >* maintain pseudo-disablement of the listbox, even if parent.setall(...) disabled it >with this > if .parent.parent.visible && don't need to refresh if it's invisible > .enabled = .t. && always keep the listbox actually enabled > >* fake up disablement of listbox so as to keep selections visible > if .parent.enabled && parent container is enabled >* use default colors (I included all for clarity, but only two of these really change) >*!* this.ItemBackColor = rgb(255,255,255) && white > .itemforecolor = rgb(0,0,0) && black > .selecteditembackcolor = ; > iif(.parent.check1.value=1, rgb(128,0,0), rgb(0,0,128)) && dark red or blue > > else && parent container is disabled >* use pseudo-disabled colors for the listbox >*!* this.ItemBackColor = rgb(255,255,255) && white > .itemforecolor = rgb(128,128,128) && gray > .selecteditembackcolor = ; > iif(.parent.check1.value=1, rgb(255,128,128), rgb(128,128,255)) && light red or blue >*!* this.SelectedItemForeColor = rgb(255,255,255) && white > endif > dodefault() > endif >endwith>
>******************************************************************** >* 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 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 .HasDependents > .Cascade() && force re-init of any dependent controls > endif >endwith>