Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


AskFileName Window Location

Keywords:     AskFileName   WinPlace	IntControl(63

Question:

I am using AskFileName and would like it to appear in the middle of my screen. No matter what WinPlace commands I enter it is still smoshed against the side of my screen. I guess this is because they are not really executed until after I close the AskFileName window.

Is there any way I haven't thought of to display this in a "nicer" location?

Answer:

AskFileList is a system dialog that tries to come up as close to the WinBatch window as possible. Well, the WinBatch window is usually an icon at the bottom of the screen, so the AskItemList gets smooched over there.

This seems to work to resize AskFileName:

It requires 2 WB scripts:

   ;SCRIPT #1
   run("c:\program files\winbatch\system\winbatch.exe", "c:\temp\wplace.wbt")
   ;BoxOpen("","")
   types="All Files|*.*|WIL Files|*.wbt;*.mnu|Text Files|*.txt|"
   fn1=AskFileName("SelectFile", "C:\temp", types, "Sol.wbt", 0)
   Message("File selected was", fn1)

   Filecopy("c:\temp\junk.wbt", fn1, @true)
 
   ;SCRIPT #2 - WPLACE.WBT
   while 1
   if !winexist("SelectFile") 
      timedelay(1)
   else
    Winplace(250,250, @noresize, @noresize, `SelectFile`)
     break
     endif
   timedelay(1)
   endwhile
;;;;;;;;;;;;;;;;;;;;;;;;;

OR, if you do a BoxOpen("","") first to move the WinBatch window to the middle of the screen, then it will open up more or less centered, e.g.:

   BoxOpen("Be alert!","The world needs more lertz.")
   fn=AskFileName(...
   BoxShut()


Question:

Is there any possiblility to expand the size of the AskFileText Window?

Answer:

IntControl 63 can expand the AskFileText window. Check the WIL help file.
Article ID:   W13040
Filename:   AskFileName Window Location and Size.txt