I have an image in the first field of the list box. The following code below works perfectly with one exception.
If I click below the list items into a blank area in the listbox, nothing seems to fire that would trigger the code. I have put messageboxs into the click, refresh, gotfocus, when, requery, and the lostfocus event to see what firing.
The field for the picture remains blank until I click on a list item.
cprogram_images=area on the hard disk where the images are stored.
lcusercreated=default image if not found
LOCAL lcdiskname
STORE SPACE(1) TO lcdiskname
FOR iItem = 1 TO THIS.ListCount && files start at the 1th item
lcdiskname = THIS.List(iItem)
LCFILENAME = ALLTRIM(CPROGRAM_Images)+ALLTRIM(lcdiskname)+".bmp"
THIS.PICTURE(iItem)=IIF(FILE(LCFILENAME),LCFILENAME,LCUSERCREATED)
ENDFOR
I know there has to be way a fix this. I appreciate the help. Thank you in advance.
If I click below the list items into a blank area in the listbox, nothing seems to fire that would trigger the code. I have put messageboxs into the click, refresh, gotfocus, when, requery, and the lostfocus event to see what firing.
The field for the picture remains blank until I click on a list item.
cprogram_images=area on the hard disk where the images are stored.
lcusercreated=default image if not found
LOCAL lcdiskname
STORE SPACE(1) TO lcdiskname
FOR iItem = 1 TO THIS.ListCount && files start at the 1th item
lcdiskname = THIS.List(iItem)
LCFILENAME = ALLTRIM(CPROGRAM_Images)+ALLTRIM(lcdiskname)+".bmp"
THIS.PICTURE(iItem)=IIF(FILE(LCFILENAME),LCFILENAME,LCUSERCREATED)
ENDFOR
I know there has to be way a fix this. I appreciate the help. Thank you in advance.