Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removed reference to K_LBUTTONDOWN to avoid the weird problem of the 1002nd item of a long list in GET LISTBOX DROPDOWN
To test just use it with an array of more than 1000 items
I really do not know for what it was there ( K_LBUTTONDOWN ) but removing it will cause the code to work properly.
Note: To test you need to use something like GTWVT/WVG and mouse clicks between fields. When you click on a GET LISTBOX field with an array of more than 1000 items you will see the error: It always point to the 1002nd element doesn't matter which one was previously selected on the GET variable.
Build the following test with hbmk2 -gtwvt option:
#include 'inkey.ch'
ANNOUNCE HB_GTSYS
REQUEST HB_GT_WVT_DEFAULT
REQUEST HB_CODEPAGE_FRISO
PROCEDURE MAIN()
LOCAL i
LOCAL aList := {}
LOCAL c1 := 'test'
LOCAL c2 := '1000'
hb_cdpSelect( 'FRISO' )
SET EVENTMASK TO INKEY_ALL + HB_INKEY_GTEVENT - INKEY_MOVE
FOR i := 1 TO 1030
AADD( aList, { STRZERO(i,4) + '-xxxxx', STRZERO(i,4) } )
NEXT i
DO WHILE .T.
CLS
ENDDO
RETURN