TextBox.st
changeset 1654 790df576b51b
parent 1555 333b639caa8a
child 2088 c8a9d7712cc2
equal deleted inserted replaced
1653:b370ee2a1b4e 1654:790df576b51b
    80     textBox label:'Makefile'.
    80     textBox label:'Makefile'.
    81     textBox extent:(600@250); sizeFixed:true.
    81     textBox extent:(600@250); sizeFixed:true.
    82     textBox showAtPointer.
    82     textBox showAtPointer.
    83                                                                         [exEnd]
    83                                                                         [exEnd]
    84 "
    84 "
       
    85 ! !
       
    86 
       
    87 !TextBox class methodsFor:'common dialogs'!
       
    88 
       
    89 openOn:someText
       
    90     "open a textBox on some text, 
       
    91      return (the possibly modified) text if accepted; nil otherwise."
       
    92 
       
    93     |box returnValue|
       
    94 
       
    95     box := self new.
       
    96     box title:'Text'.
       
    97     box initialText:someText.
       
    98     box action:[:text | returnValue := text].
       
    99     box showAtPointer.
       
   100     ^ returnValue.
       
   101 
       
   102     "
       
   103      TextBox openOn:'hello'
       
   104     "
    85 ! !
   105 ! !
    86 
   106 
    87 !TextBox class methodsFor:'defaults'!
   107 !TextBox class methodsFor:'defaults'!
    88 
   108 
    89 defaultExtent
   109 defaultExtent
   171 ! !
   191 ! !
   172 
   192 
   173 !TextBox class methodsFor:'documentation'!
   193 !TextBox class methodsFor:'documentation'!
   174 
   194 
   175 version
   195 version
   176     ^ '$Header: /cvs/stx/stx/libwidg2/TextBox.st,v 1.14 1999-09-22 16:25:55 cg Exp $'
   196     ^ '$Header: /cvs/stx/stx/libwidg2/TextBox.st,v 1.15 2000-01-22 22:02:53 cg Exp $'
   177 ! !
   197 ! !