DialogBox.st
changeset 6410 2316993d032e
parent 6406 de31d4ed0246
child 6425 8d3debec2453
equal deleted inserted replaced
6409:9f21c00d1e13 6410:2316993d032e
  1293 !
  1293 !
  1294 
  1294 
  1295 information:aString
  1295 information:aString
  1296     "launch a Dialog to tell user something"
  1296     "launch a Dialog to tell user something"
  1297 
  1297 
  1298     self information:aString title:(aString upTo:Character cr)
  1298     self information:aString title:'Information' "/ (aString upTo:Character cr)
  1299 
  1299 
  1300     "
  1300     "
  1301      Dialog information:'help'
  1301      Dialog information:'help'
  1302     "
  1302     "
  1303 
  1303 
  1304     "Modified: 29.5.1996 / 15:23:03 / cg"
  1304     "Modified: / 29-05-1996 / 15:23:03 / cg"
       
  1305     "Modified: / 27-08-2018 / 11:13:51 / Claus Gittinger"
  1305 !
  1306 !
  1306 
  1307 
  1307 information:aString title:windowTitle
  1308 information:aString title:windowTitle
  1308     "launch a Dialog to tell user something"
  1309     "launch a Dialog to tell user something"
  1309 
  1310 
  1408     ((currentScreen := Screen current) notNil and:[currentScreen nativeDialogs]) ifTrue:[
  1409     ((currentScreen := Screen current) notNil and:[currentScreen nativeDialogs]) ifTrue:[
  1409         ^ currentScreen 
  1410         ^ currentScreen 
  1410             nativeWarnOK:aString
  1411             nativeWarnOK:aString
  1411             title:windowTitle
  1412             title:windowTitle
  1412     ].
  1413     ].
  1413     self showAndThenDestroyBox:(WarningBox title:windowTitle label:aString)
  1414     self showAndThenDestroyBox:(WarningBox title:aString label:windowTitle)
  1414 
  1415 
  1415     "
  1416     "
  1416      Dialog warn:'some warning message'
  1417      Dialog warn:'some warning message' title:'oops'
  1417 
  1418 
  1418      Dialog warn:('some text with italic emphasis' asText 
  1419      Dialog warn:('some text with italic emphasis' asText 
  1419                         emphasizeFrom:16 to:22 with:#italic)
  1420                         emphasizeFrom:16 to:22 with:#italic)
  1420 
  1421 
  1421      Dialog warn:('some warning message' asText 
  1422      Dialog warn:('some warning message' asText 
  1426                         emphasizeFrom:16 to:20 with:(#color->Color red))
  1427                         emphasizeFrom:16 to:20 with:(#color->Color red))
  1427     "
  1428     "
  1428 
  1429 
  1429     "Modified: / 29-05-1996 / 15:23:14 / cg"
  1430     "Modified: / 29-05-1996 / 15:23:14 / cg"
  1430     "Created: / 20-01-2012 / 15:54:26 / cg"
  1431     "Created: / 20-01-2012 / 15:54:26 / cg"
  1431     "Modified: / 26-08-2018 / 17:00:14 / Claus Gittinger"
  1432     "Modified: / 27-08-2018 / 12:10:11 / Claus Gittinger"
  1432 ! !
  1433 ! !
  1433 
  1434 
  1434 !DialogBox class methodsFor:'confirmation dialogs'!
  1435 !DialogBox class methodsFor:'confirmation dialogs'!
  1435 
  1436 
  1436 confirm:aString
  1437 confirm:aString