Wilson WindowWare Tech Support

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


How to Resize Dialog & Ask... boxes with
2nd WinBatch Script

Keywords: winplace resize window size askitemlist askpassword askfiletext askline

Question:

How do I resize a AskItemList or Message box with WinBatch?

Answer:

In order to resize a dialog box on the screen, you must write a second script with the WinPlace function that resizes to the first script's dialog box. Note that the WinPlace can *only* be used to resize Parent windows. (To resize child windows in applications, since you can't use the WinPlace function, you'll have to send keystrokes to the child window, like Alt- (the Alt key plus a hyphen key), to bring up the control menu, and go from there.)

;;;;First WBT file starts a AskItemList box.


list=strcat("Red",@tab,"Blue",@tab,"Yellow",@tab,"Green")

Run("2ndwbt.exe", "")

A=AskItemList("Colors", list, @tab, @sorted, @single)
Message("The item selected is", A)
exit

 

 ;;2ndwbt.exe	  Resizes and then closes the box.

 WinPlace(41,55,952,825,`Colors`)
 delay(2)	

 WinPlace(37,145,956,765,`Colors`)
 delay(2)		  

 WinPlace(37,145,542,765,`Colors`)
 delay(2)
 SendKeysTo("Colors", "{ENTER}")

Article ID:   W13180
Filename:   Resize and Place Dialog boxes with 2nd wbt.txt