--- a/DialogBox.st Sun May 12 16:04:12 1996 +0200
+++ b/DialogBox.st Sun May 12 16:12:15 1996 +0200
@@ -852,6 +852,37 @@
]
]
[exEnd]
+ an example from Hopkins/Horan:
+ [exbegin]
+ |aText index|
+
+ aText := 'Smalltalk/X: An Introduction to Application Development' asText.
+ index := aText findString:'Smalltalk/X' startingAt:1.
+ aText emphasizeFrom:index
+ to:'Smalltalk/X' size + index - 1
+ with:#bold.
+ index := aText findString:'Introduction' startingAt:index.
+ aText emphasizeFrom:index
+ to:'Introduction' size + index - 1
+ with:#italic.
+ DialogView warn:aText
+
+ [exEnd]
+ the same, with colors:
+ [exbegin]
+ |aText index|
+
+ aText := 'Smalltalk/X: An Introduction to Application Development' asText.
+ index := aText findString:'Smalltalk/X' startingAt:1.
+ aText emphasizeFrom:index
+ to:'Smalltalk/X' size + index - 1
+ with:(Array with:#bold with:#underline with:(#color->Color red)).
+ index := aText findString:'Introduction' startingAt:index.
+ aText emphasizeFrom:index
+ to:'Introduction' size + index - 1
+ with:#italic.
+ DialogView warn:aText
+ [exEnd]
"
!
@@ -921,8 +952,20 @@
(WarningBox title:aString) showAtPointer
"
- Dialog warn:'help'
+ Dialog warn:'some warning message'
+
+ Dialog warn:('some text with italic emphasis' asText
+ emphasizeFrom:16 to:22 with:#italic)
+
+ Dialog warn:('some warning message' asText
+ emphasizeAllWith:(#color->Color red))
+
+ Dialog warn:('some text with color emphasis' asText
+ emphasizeFrom:6 to:10 with:(#color->Color blue);
+ emphasizeFrom:16 to:20 with:(#color->Color red))
"
+
+ "Modified: 12.5.1996 / 16:11:48 / cg"
! !
!DialogBox class methodsFor:'confirmation dialogs'!
@@ -4428,6 +4471,6 @@
!DialogBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.68 1996-04-30 10:00:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.69 1996-05-12 14:12:15 cg Exp $'
! !
DialogBox initialize!