Posted by Grant Foraker on July 18, 2005 at 12:25:30:
I have a set of "Direct" method programs that create a ListView and at the end select the first item and set the focus. The logic since I began has always been ...
! select first item
LET cosItemId = 0
cosCtlId = ID.LISTBOX
cosState = LVIS.SELECTED
coslParam = LVIS.SELECTED
Gosub COS.ListView.SetItemState
! put focus on control
LET cosCtlId = ID.LISTBOX
Gosub COS.SetDlgItemFocus
On my office system (2005) and my 2005 customers, the first line has a grayed background instead of a blue highlight (selected?) and the default "Close" button isn't active. It has to be clicked. Previously, an Enter was equivalent to a button click. The one 2004 customer left with one of the direct method programs, still works as before even though the OBJ was compiled under 2005.