Code: Select all
#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
Code: Select all
METHOD Select( nItem ) INLINE If( ! ::IsMultipleSel(), ::SendMsg(
LB_SETCURSEL, nItem - 1, 0 ), ::SetSel( nItem ) ),;
::Change()