FileSelectFile does not display long default filenames properly

Report problems with documented functionality
Frozen Storm
Posts: 15
Joined: 24 Aug 2016, 09:43

FileSelectFile does not display long default filenames properly

12 Mar 2018, 13:20

I'm using FileSelectFile to have the user find a fairly long-named executable file:

Code: Select all

dir := "C:\Potato"
FileSelectFile, file, 3, %dir%\HavokBehaviorPostProcess.exe, Find the location of your HavokBehaviorPostProcess.exe:, Executable Files (*.exe)
MsgBox, %file%
The above code displays the file selection dialog correctly, but the file name is not displayed fully:
Image

Using a shorter filename solves the issue, but unfortunately the .exe is a piece of third party software.

This seems to be a display bug only, as simply pressing Open in the above dialog still prints out the proper filename in the MsgBox (and correctly detects that the file exists, as per FileSelectFile mode 3):
C:\Potato\HavokBehaviorPostProcess.exe
I believe this to be a bug, as another user had the same problem a while ago and it was not resolved, only the source code of FileSelectFile was posted. I am unfortunately fairly new to C++ (particularly GUIs in C++), so I wasn't able to locate the bug.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: FileSelectFile does not display long default filenames properly

13 Mar 2018, 02:38

This is standard Windows behaviour. I confirmed by using the following code at an interactive C# prompt:

Code: Select all

var fd = new System.Windows.Forms.OpenFileDialog();
fd.FileName = "HavokBehaviorPostProcess.exe";
fd.ShowDialog();
This is a standard system dialog; AutoHotkey has virtually no control over how it is displayed. Its appearance differs between OS versions.
just me
Posts: 9449
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: FileSelectFile does not display long default filenames properly

13 Mar 2018, 02:58

The edit control in the dialog contains the complete file name. For some reason, long file names are scrolled to the left.
icuurd12b42
Posts: 202
Joined: 14 Aug 2016, 04:08

Re: FileSelectFile does not display long default filenames properly

13 Mar 2018, 04:37

It may be because the file dialog was opened smaller than shown and then resized. not that this thought would help to a solution

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 23 guests