OptionBox.st
changeset 2668 c8655a5eb411
parent 2585 bc342ad3c166
child 2669 182aa7a00d83
equal deleted inserted replaced
2667:943ce849e7be 2668:c8655a5eb411
   140     ^ box
   140     ^ box
   141 
   141 
   142     "Modified: / 23.2.2000 / 11:59:32 / cg"
   142     "Modified: / 23.2.2000 / 11:59:32 / cg"
   143 !
   143 !
   144 
   144 
       
   145 request:title buttonLabels:labels values:values 
       
   146     "create a new optionBox, open it modal and return the value of
       
   147      the corresponding values collection."
       
   148 
       
   149     ^ self request:title label:title buttonLabels:labels values:values
       
   150 
       
   151     "
       
   152      OptionBox 
       
   153         request:'please select any'
       
   154         buttonLabels:#('one' 'two' 'three')
       
   155         values:#(1 2 3)   
       
   156     "
       
   157 !
       
   158 
   145 request:title label:label buttonLabels:labels values:values 
   159 request:title label:label buttonLabels:labels values:values 
   146     "create a new optionBox, open it modal and return the value of
   160     "create a new optionBox, open it modal and return the value of
   147      the corresponding values collection."
   161      the corresponding values collection."
   148 
   162 
   149     ^ self 
   163     ^ self 
   150         request:title label:label form:(YesNoBox iconBitmap)
   164         request:title label:label form:(YesNoBox iconBitmap)
   151         buttonLabels:labels values:values default:nil onCancel:nil
   165         buttonLabels:labels values:values default:nil onCancel:nil
       
   166 
       
   167     "
       
   168      OptionBox 
       
   169         request:'please select'
       
   170         label:'select any'
       
   171         buttonLabels:#('one' 'two' 'three')
       
   172         values:#(1 2 3)   
       
   173     "
   152 !
   174 !
   153 
   175 
   154 request:title label:label buttonLabels:labels values:values default:defaultValue
   176 request:title label:label buttonLabels:labels values:values default:defaultValue
   155     "create a new optionBox, open it modal and return the value of
   177     "create a new optionBox, open it modal and return the value of
   156      the corresponding values collection. (nil if cancelled)"
   178      the corresponding values collection. (nil if cancelled)"
   157 
   179 
   158     ^ self
   180     ^ self
   159         request:title label:label form:(YesNoBox iconBitmap) buttonLabels:labels values:values 
   181         request:title label:label form:(YesNoBox iconBitmap) buttonLabels:labels values:values 
   160         default:defaultValue onCancel:defaultValue
   182         default:defaultValue onCancel:defaultValue
       
   183 
       
   184     "
       
   185      OptionBox 
       
   186         request:'please select'
       
   187         label:'select any'
       
   188         buttonLabels:#('one' 'two' 'three')
       
   189         values:#(1 2 3)   
       
   190         default:3   
       
   191     "
   161 !
   192 !
   162 
   193 
   163 request:title label:label buttonLabels:labels values:values default:defaultValue onCancel:cancelValue
   194 request:title label:label buttonLabels:labels values:values default:defaultValue onCancel:cancelValue
   164     "create a new optionBox, open it modal and return the value of
   195     "create a new optionBox, open it modal and return the value of
   165      the corresponding values collection. (nil if cancelled)"
   196      the corresponding values collection. (nil if cancelled)"
   166 
   197 
   167     ^ self
   198     ^ self
   168         request:title label:label form:(YesNoBox iconBitmap) buttonLabels:labels values:values 
   199         request:title label:label form:(YesNoBox iconBitmap) buttonLabels:labels values:values 
   169         default:defaultValue onCancel:cancelValue
   200         default:defaultValue onCancel:cancelValue
       
   201 
       
   202     "
       
   203      OptionBox 
       
   204         request:'please select'
       
   205         label:'select any'
       
   206         buttonLabels:#('one' 'two' 'three')
       
   207         values:#(1 2 3)   
       
   208         default:3   
       
   209         onCancel:2   
       
   210     "
   170 !
   211 !
   171 
   212 
   172 request:title label:label form:aForm buttonLabels:labels values:values 
   213 request:title label:label form:aForm buttonLabels:labels values:values 
   173     "create a new optionBox, open it modal and return the value of
   214     "create a new optionBox, open it modal and return the value of
   174      the corresponding values collection."
   215      the corresponding values collection."
   175 
   216 
   176     ^ self request:title label:label form:aForm buttonLabels:labels values:values default:nil onCancel:nil
   217     ^ self request:title label:label form:aForm buttonLabels:labels values:values default:nil onCancel:nil
       
   218 
       
   219     "
       
   220      OptionBox 
       
   221         request:'please select'
       
   222         label:'select any'
       
   223         form:(WarningBox iconBitmap)
       
   224         buttonLabels:#('one' 'two' 'three')
       
   225         values:#(1 2 3)
       
   226     "
   177 !
   227 !
   178 
   228 
   179 request:title label:label form:aForm buttonLabels:labels values:values default:defaultValue
   229 request:title label:label form:aForm buttonLabels:labels values:values default:defaultValue
   180     "create a new optionBox, open it modal and return the value of
   230     "create a new optionBox, open it modal and return the value of
   181      the corresponding values collection. (nil if cancelled)"
   231      the corresponding values collection. (nil if cancelled)"
   182 
   232 
   183     ^ self
   233     ^ self
   184         request:title label:label form:aForm buttonLabels:labels values:values 
   234         request:title label:label form:aForm buttonLabels:labels values:values 
   185         default:defaultValue onCancel:defaultValue
   235         default:defaultValue onCancel:defaultValue
       
   236 
       
   237     "
       
   238      OptionBox 
       
   239         request:'please select'
       
   240         label:'select any'
       
   241         form:(WarningBox iconBitmap)
       
   242         buttonLabels:#('one' 'two' 'three')
       
   243         values:#(1 2 3)
       
   244         default:3
       
   245     "
   186 !
   246 !
   187 
   247 
   188 request:title label:label form:aForm buttonLabels:labels values:values default:defaultValue onCancel:cancelValue
   248 request:title label:label form:aForm buttonLabels:labels values:values default:defaultValue onCancel:cancelValue
   189     "create a new optionBox, open it modal and return the value of
   249     "create a new optionBox, open it modal and return the value of
   190      the corresponding values collection. (cancelValue if cancelled)"
   250      the corresponding values collection. (cancelValue if cancelled)"
   205     box destroy.
   265     box destroy.
   206 
   266 
   207     ^ retVal
   267     ^ retVal
   208 
   268 
   209     "
   269     "
   210      OptionBox request:'please select'
   270      OptionBox 
   211                label:'select any'
   271         request:'please select'
   212                form:(WarningBox iconBitmap)
   272         label:'select any'
   213                buttonLabels:#('one' 'two' 'three')
   273         form:(WarningBox iconBitmap)
   214                values:#(1 2 3)
   274         buttonLabels:#('one' 'two' 'three')
   215                default:3
   275         values:#(1 2 3)
       
   276         default:3
       
   277         onCancel:nil
   216     "
   278     "
   217 
   279 
   218     "Modified: / 23.2.2000 / 11:59:32 / cg"
   280     "Modified: / 23.2.2000 / 11:59:32 / cg"
   219 ! !
   281 ! !
   220 
   282 
   477 ! !
   539 ! !
   478 
   540 
   479 !OptionBox class methodsFor:'documentation'!
   541 !OptionBox class methodsFor:'documentation'!
   480 
   542 
   481 version
   543 version
   482     ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.52 2002-08-20 14:36:20 cg Exp $'
   544     ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.53 2002-11-21 13:11:20 cg Exp $'
   483 ! !
   545 ! !