Rob,

I thought I would hang back and let a real guru answer your question, but no 
real gurus seem to be stepping up to the plate so here I go:

Win32::GUI::GetOpenFileName is a hook into a Windows system resource, it is not 
a Win32::GUI object over which you have control.  You (the programmer) can't 
size it or position it at all.  The system will position it every time and, to 
the best of my knowledge, the system places it exactly where the user left it 
the last time they called it up -- with any program, not just your Win32::GUI 
application.

Once again, I am not a guru... I've actually only been using Win32::GUI for a 
few weeks, although I've been programming Perl on Win32 for years now.  If 
someone more knowledgeable than I wants to contradict anything I've said here, 
I hope they will feel free to do so.  YMMV, 'nuff said.

Hope this helps,

-Brian


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob
Sent: Thursday, September 22, 2005 21:23
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Centering Win32::GUI::GetOpenFileName Dialog Box

 Does anyone know how I could center my Win32::GUI::GetOpenFileName dialog
 box in my window say $window_main?
 
    $directory_and_file_name = Win32::GUI::GetOpenFileName
    (
      -owner     =>  $window_main ,
      -size      =>  [ 400, 400 ] ,
      -directory =>  $directory ,
      -file      =>  $file ,
      -title     =>  'Open' ,
      -filter    =>  [ 'Text files' , '*.txt' , 'All files' , '*.*' ] ,
    ) ;

Rob
HµŠ²²uj¢z¢žjžÂ…zЦ®–Š­ymµvŠÚ²¾¢zŸ=–…¶k¶²q®zzІ®ŸPzjž²®ŸPzвq®zØm¶›?þX¬¶Ë(º·~Šàzw­þX¬¶ÏåŠËbú?¥êåÂ)÷Ú
¢ºÇ«


Reply via email to