SELECT somefield FROM sometable WHERE conditions INTO CURSOR somecursor READWRITE SCAN IF disable_condition REPLACE somefield WITH "\" + somefield ENDIF ENDSCAN WITH myListBox .RowSourceType = 2 && alias .RowSource = "somecoursor" ENDWITHWhen the listbox displays, it shows the backslash in the item and none of the items are disabled.
SELECT somefield FROM sometable WHERE conditions INTO CURSOR somecursor READWRITE SCAN IF disable_condition REPLACE somefield WITH "\" + somefield ENDIF ENDSCAN DIME thisform.aMyListBox[RECCOUNT("somecursor")] && Copy to array only copies to the current length of the array COPY TO ARRAY thisform.aMyListBox WITH myListBox .RowSourceType = 5 && array .RowSource = "thisform.aMyListBox" ENDWITHNow all the items I want to be disabled show in the disabled color. If you double-click on a disabled item nothing will happen.
**In ListBox DblClick code IF thisform.aMyListBox[this.ListIndex] = "\" RETURN 0 ENDIF .....rest of codebut...