DialogBox.st
changeset 5091 f69c39e3dc9e
parent 5061 f9dd828a782c
child 5191 dae927f4f9c2
equal deleted inserted replaced
5090:ed3edaf6714f 5091:f69c39e3dc9e
  4728          onCancel:nil       
  4728          onCancel:nil       
  4729     "
  4729     "
  4730 
  4730 
  4731     "Created: 27.1.1996 / 14:31:45 / cg"
  4731     "Created: 27.1.1996 / 14:31:45 / cg"
  4732     "Modified: 29.5.1996 / 14:28:59 / cg"
  4732     "Modified: 29.5.1996 / 14:28:59 / cg"
       
  4733 !
       
  4734 
       
  4735 request:aString title:windowTitle
       
  4736     "launch a Dialog, which allows user to enter a string."
       
  4737 
       
  4738     ^ self
       
  4739         request:aString 
       
  4740         displayAt:nil 
       
  4741         centered:(ForceModalBoxesToOpenAtCenter ? false) 
       
  4742         action:nil 
       
  4743         initialAnswer:nil 
       
  4744         okLabel:nil 
       
  4745         cancelLabel:nil 
       
  4746         title:windowTitle 
       
  4747         onCancel:''
       
  4748         list:nil
       
  4749         initialSelection:nil
       
  4750 
       
  4751     "
       
  4752      at topLeft (centering is suppressed, to make the box fully visible)    
       
  4753          Dialog 
       
  4754             request:'enter a string:'
       
  4755             displayAt:0@0
       
  4756             centered:true
       
  4757             action:[:result | result printNewline]
       
  4758             initialAnswer:'the default'
       
  4759             onCancel:#foo
       
  4760 
       
  4761      centered around 200@200:
       
  4762 
       
  4763          Dialog 
       
  4764             request:'enter a string:'
       
  4765             displayAt:200@200
       
  4766             centered:true
       
  4767             action:[:result | result printNewline]
       
  4768             initialAnswer:'the default'
       
  4769             onCancel:#foo
       
  4770 
       
  4771      topLeft of box at 200@200:
       
  4772 
       
  4773          Dialog 
       
  4774             request:'enter a string:'
       
  4775             displayAt:200@200
       
  4776             centered:false 
       
  4777             action:[:result | result printNewline]
       
  4778             initialAnswer:'the default'
       
  4779             onCancel:#foo
       
  4780 
       
  4781      under mouse pointer:
       
  4782 
       
  4783          Dialog 
       
  4784             request:'enter a string:'
       
  4785             displayAt:nil
       
  4786             centered:false 
       
  4787             action:[:result | result printNewline]
       
  4788             initialAnswer:'the default'
       
  4789             onCancel:#foo
       
  4790 
       
  4791      centered on the screen:
       
  4792 
       
  4793          Dialog 
       
  4794             request:'enter a string:'
       
  4795             displayAt:nil
       
  4796             centered:true 
       
  4797             action:[:result | result printNewline]
       
  4798             initialAnswer:'the default'
       
  4799             onCancel:#foo
       
  4800     "
       
  4801 
       
  4802     "Created: 7.12.1995 / 23:14:10 / cg"
       
  4803     "Modified: 29.5.1996 / 14:24:39 / cg"
  4733 !
  4804 !
  4734 
  4805 
  4735 request:aString title:titleString initialAnswer:initial
  4806 request:aString title:titleString initialAnswer:initial
  4736     "launch a Dialog, which allows user to enter something.
  4807     "launch a Dialog, which allows user to enter something.
  4737      Return the entered string (may be empty string) or nil (if cancel was pressed)"
  4808      Return the entered string (may be empty string) or nil (if cancel was pressed)"
 10177 ! !
 10248 ! !
 10178 
 10249 
 10179 !DialogBox class methodsFor:'documentation'!
 10250 !DialogBox class methodsFor:'documentation'!
 10180 
 10251 
 10181 version
 10252 version
 10182     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.358 2014-06-13 21:06:30 cg Exp $'
 10253     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.359 2014-07-03 16:37:48 cg Exp $'
 10183 !
 10254 !
 10184 
 10255 
 10185 version_CVS
 10256 version_CVS
 10186     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.358 2014-06-13 21:06:30 cg Exp $'
 10257     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.359 2014-07-03 16:37:48 cg Exp $'
 10187 ! !
 10258 ! !
 10188 
 10259 
 10189 
 10260 
 10190 DialogBox initialize!
 10261 DialogBox initialize!