Hello all,
I am seeing an issue with OpenFileDialog() that I can't figure out how to resolve. When i call the dialog with the last file selected as the default file name, the file name does not fully show in the selection box. It is highlighted and shows about half the name of the file. If i click outside the name box in the dialog, then back into the name box, it shows the whole name. For example the dialog below was called with "suggested file really long name.dat" as the default file. It only shows "y long name.dat" as the highlighted text in the File Name box. I'm running Windows 10 on a Lenovo P15s laptop (Intel I7).

Here's the code:
I am seeing an issue with OpenFileDialog() that I can't figure out how to resolve. When i call the dialog with the last file selected as the default file name, the file name does not fully show in the selection box. It is highlighted and shows about half the name of the file. If i click outside the name box in the dialog, then back into the name box, it shows the whole name. For example the dialog below was called with "suggested file really long name.dat" as the default file. It only shows "y long name.dat" as the highlighted text in the File Name box. I'm running Windows 10 on a Lenovo P15s laptop (Intel I7).
Here's the code:
Code:
#COMPILE EXE #DIM ALL #INCLUDE "WIN32API.INC" #INCLUDE "COMDLG32.INC" 'use this to select multifiles '%OFN_ALLOWMULTISELECT OR %OFN_EXPLORER OR _ ' %OFN_FILEMUSTEXIST OR %OFN_NODEREFERENCELINKS _ ' FUNCTION PBMAIN () AS LONG LOCAL sFilename AS STRING LOCAL sPath AS STRING LOCAL filefilter AS STRING sfilename = "suggested file really long name.dat" PRINT sPath = CURDIR$ filefilter = "All Files (*.*)|*.*|Text Files (*.TXT, *.BAT)|*.TXT;*.BAT|" IF OpenFileDialog(BYVAL %HWND_DESKTOP, "Find File To Process", sFilename, sPath, filefilter, "test string", %OFN_EXPLORER OR %OFN_FILEMUSTEXIST OR %OFN_NODEREFERENCELINKS ) = 0 THEN 'cancel hit PRINT "Cancel hit" END IF PRINT "returned file name = "; sFilename WAITKEY$ END FUNCTION
Comment