If you then go back up to enter another 'account', but skip the 'type' since it is still showing the last 'type' selected in the dropdown, no value is assigned to cType even though it is showing in the GET.
How can I either clear the DCCOMBOBOX get so that the user is forced to select a 'type', or have the value showing assigned to the variable cType?
Thanks,
GeneB
Code: Select all
#include "dcdialog.ch"
FUNCTION Main()
local cAcct:=SPACE(4), cType:=SPACE(1) ;
, aType:={"E expense","L liability","A asset"} ;
, GetOptions, getlist:={}
@ 1,1 DCSAY "Acct" GET cAcct PICTURE "!!!!" SAYSIZE 8 GETSIZE 7
@ 3,1 DCSAY "Type"
@ 3,10 DCCOMBOBOX cType LIST aType ;
SIZE 12,4 TYPE XBPCOMBO_DROPDOWNLIST
@ 6,1 DCPUSHBUTTON CAPTION "SAVE" SIZE 11,1.5 ;
ACTION {|| DC_MsgBox(,,{"Acct " + cAcct + " Type " + cType},,.t. ) ;
, cAcct := SPACE(4) ;
, cType := SPACE(1) ;
, DC_GetRefresh(getlist) }
DCREAD GUI FIT ADDBUTTONS
RETURN NIL
PROC AppSys() ; return