- Code: Select all Expand view
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oLbx
LOCAL cVar := ""
DEFINE DIALOG oDlg
@ 1, 1 LISTBOX oLbx VAR cVar ITEMS { "Bert", "Carl", "William" }
oLbx:nStyle += LBS_MULTIPLESEL
@ 3, 1 BUTTON "&Close" ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
ON INIT oLbx:Select( 1 );
CENTER
RETURN NIL
A possible fix is to change the Select() method:
- Code: Select all Expand view
METHOD Select( nItem ) INLINE If( ! ::IsMultipleSel(), ::SendMsg(
LB_SETCURSEL, nItem - 1, 0 ), ::SetSel( nItem ) ),;
::Change()
EMG