Modify

Opened 14 years ago

Closed 13 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 Changed 14 years ago by mvg

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

comment:2 follow-up: Changed 14 years ago by mikered82

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.

comment:3 in reply to: ↑ 2 Changed 14 years ago by mvg

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 Changed 13 years ago by Jon

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

comment:5 Changed 13 years ago by Jon

  • Resolution set to Wont Fix
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.