* Uploaded for public consumption!!!
*
* In version 1.7c, a double-click on a listbox would be handled directly
* by dBFast.  This was not what it was supposed to do.  In version 2.0, you 
* need to handle the code for a double-click.  
*
* Below is a piece of SAMPLE CODE which demonstrates a good way to handle
* double-clicks in listboxes.
*
*
SET PROCEDURE TO DBLCLICK
*
STORE "THREE" TO VAR1		&& INITIALIZE THE VARIABLE
*
SET LISTBOX TO 515			&& DOUBLE-CLICK WILL CALL VALID + 3 LINES IN THE LISTBOX
*
CREATE CONTROL LISTBOX "LBOX" AT 2,2 SAVE TO VAR1 CONTENTS "TITLE;ONE;TWO;THREE" VALID LBOXCHECK()
CREATE BUTTON "OK" AT 2,15 SIZE 1,10 PLAIN
CREATE BUTTON "CANCEL" AT 4,15 SIZE 1,10 PLAIN
*
DO WHILE .T.				&& MAIN EVENT LOOP
	MYEVENT=CHKEVENT()		&& GET THE EVENT HERE
	IF MYEVENT=6			&& IF IT IS A BUTTON EVENT
		DO CASE
			CASE BUTTON()="OK"			&& OK BUTTON PUSHED 
				@ 2,30 SAY "OK BUTTON PUSHED"
				@ 3,30 SAY "DATA IS "
				@ 3,38 SAY VAR1
				EXIT
			CASE BUTTON()="CANCEL"		&& CANCEL BUTTON PUSHED
				@ 2,30 SAY "CANCEL BUTTON PUSHED"
				EXIT
		ENDCASE
	ELSEIF MYEVENT=1001		&& MY EVENT ASSIGNED FOR A DOUBLE-CLICK
							&& ANY POSTEVENT() NUMBER MUST BE GREATER THAN 1000
							&& CHECK OUT THE ONLINE HELP FOR MORE DETAILS
							&& ON THE POSTEVENT() FUNCTION!
		@ 2,30 SAY "EQUIVALENT OF OK FOR A DOUBLE-CLICK"
		@ 3,30 SAY "DATA IS "
		@ 3,38 SAY VAR1
		EXIT
	ENDIF
ENDDO
WAIT ""			&& END OF SAMPLE PROGRAM


*****************
FUNCTION LBOXCHECK
*****************
POSTEVENT(1001)			&& POST AN EVENT HERE SO THAT WE KNOW A DOUBLE-CLICK OCCURRED
RETURN(.T.)				&& FUNCTIONS MUST ALWAYS RETURN VALUES!

