Modify

Opened 15 years ago

Closed 15 years ago

#1804 closed Bug (Wont Fix)

FileSelectFolder does not position itself relative to the parent window (if given parent handle).

Reported by: mikered82@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: FileSelectFolder Cc:

Description

When using FileSelectFolder, the window does not position itself relative to the parent window. FileSelectFolder should work as FileOpenDialog does.

Code to reporoduce this:

$hGUI = GUICreate("Test GUI", 300, 200, 100, 100)
$BrowseFolder = GUICtrlCreateButton("Browse Folder", 35, 20, 100, 25)
$BrowseFile = GUICtrlCreateButton("Browse File", 170, 20, 100, 25)
GUISetState()

While 1
	$GUIGetMsg = GUIGetMsg()
	Switch $GUIGetMsg
		Case -3 ;$GUI_EVENT_CLOSE
			Exit
		Case $BrowseFolder
			FileSelectFolder("dialog text", "", 1+2, "", $hGUI)
		Case $BrowseFile
			FileOpenDialog("title", @DesktopDir, "All (*.*)", Default, "", $hGUI)
	EndSwitch
WEnd

Attachments (0)

Change History (5)

comment:1 by mvg, 15 years ago

no bug.
Your not using it right. -> goto forum of help file.

comment:2 by mikered82, 15 years ago

I did some testing and found that this bug only occurs when flag 1 or 2 (or both) is used.

Note: I have Windows XP and IE 8.

in reply to:  2 comment:3 by mvg, 15 years ago

Aha, misread your message.

"FileSelectFolder with flag 1 and/or 2 is locked to center position of desktop"(single screen over here)
Additional test case, in case it helps.

$RootFolder = 'c:\_Test_FileSelectFolder'
$InitialFolder = $RootFolder & '\' & 'sub01\sub11'

If FileExists($RootFolder) Then Exit 960

DirCreate($InitialFolder & '\' & 'sub21')
If Not FileExists('c:\_Test_FileSelectFolder\sub01\sub11') Then Exit 961

Dim $aData[8] = ['0', '1', '2', '2+1', '4', '4+1', '4+2', '4+2+1']

;; no additional parent gui.
For $e In $aData
	FileSelectFolder('FileSelectFolder (' & $e & ')', $RootFolder, Number($e), $InitialFolder)
Next

;; with additional parent gui.
$hGUI = GUICreate("Parent GUI", 100, 100, @DesktopWidth - 200, @DesktopHeight - 200) ;; drop near bottom-right.
GUISetState()
For $e In $aData
	FileSelectFolder('FileSelectFolder (' & $e & ')', $RootFolder, Number($e), $InitialFolder, $hGUI)
Next

DirRemove($RootFolder, 1) ;; recurse.

comment:4 by Jon, 15 years ago

Checked with Spy++ and the folder selection window has the correct parent. So it must be a Windows API curiosity.

comment:5 by Jon, 15 years ago

Resolution: Wont Fix
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.