checkin from browser
authorClaus Gittinger <cg@exept.de>
Thu, 15 Apr 1999 14:33:52 +0200
changeset 1843 b868964a554e
parent 1842 b5069ac92167
child 1844 a76a2ba85a4b
checkin from browser
DialogBox.st
--- a/DialogBox.st	Thu Apr 15 12:02:21 1999 +0200
+++ b/DialogBox.st	Thu Apr 15 14:33:52 1999 +0200
@@ -3039,6 +3039,30 @@
     "Modified: 31.5.1996 / 21:22:13 / cg"
 !
 
+makeTabable:aComponentOrSubcomponent after:anotherComponent
+    "add a component (usually a subcomponent, of which the dialog
+     does not know) to the list of tabable ones (i.e. those, that can be
+     stepped through via FocusNext/FocusPrevious).
+     Toplevel tabable components are usually added with #addComponent:tabable:"
+
+    tabableElements isNil ifTrue:[
+        tabableElements := OrderedCollection new
+    ].
+    tabableElements removeIdentical:aComponentOrSubcomponent ifAbsent:nil.
+
+    anotherComponent isNil ifTrue:[
+        tabableElements addLast:aComponentOrSubcomponent
+    ] ifFalse:[
+        tabableElements add:aComponentOrSubcomponent after:anotherComponent.
+    ].
+
+    (aComponentOrSubcomponent isInputField) ifTrue:[
+        self addToInputFieldGroup:aComponentOrSubcomponent after:anotherComponent
+    ].
+
+    "Modified: 18.10.1997 / 03:08:20 / cg"
+!
+
 makeTabable:aComponentOrSubcomponent before:anotherComponent
     "add a component (usually a subcomponent, of which the dialog
      does not know) to the list of tabable ones (i.e. those, that can be
@@ -3046,18 +3070,18 @@
      Toplevel tabable components are usually added with #addComponent:tabable:"
 
     tabableElements isNil ifTrue:[
-	tabableElements := OrderedCollection new
+        tabableElements := OrderedCollection new
     ].
     tabableElements removeIdentical:aComponentOrSubcomponent ifAbsent:nil.
 
     anotherComponent isNil ifTrue:[
-	tabableElements addFirst:aComponentOrSubcomponent
+        tabableElements addFirst:aComponentOrSubcomponent
     ] ifFalse:[
-	tabableElements add:aComponentOrSubcomponent before:anotherComponent.
+        tabableElements add:aComponentOrSubcomponent before:anotherComponent.
     ].
 
     (aComponentOrSubcomponent isInputField) ifTrue:[
-	self addToInputFieldGroup:aComponentOrSubcomponent before:anotherComponent
+        self addToInputFieldGroup:aComponentOrSubcomponent before:anotherComponent
     ].
 
     "Modified: 18.10.1997 / 03:08:20 / cg"
@@ -3834,10 +3858,10 @@
 
     buttonPanel addSubView:aButton after:someOtherButtonOrNil.
     buttonPanel subViews size > 1 ifTrue:[
-	buttonPanel horizontalLayout:#fitSpace.
+        buttonPanel horizontalLayout:#fitSpace.
     ].
     (h := (aButton heightIncludingBorder + (ViewSpacing * 2))) > buttonPanel topInset ifTrue:[
-	 buttonPanel topInset:h negated
+         buttonPanel topInset:h negated
     ].
     needResize := true.
     ^ aButton
@@ -3849,9 +3873,9 @@
      dialog addAbortButton.
      dialog addOkButton.
      dialog addButton:(Button 
-			label:'foo' 
-			action:[dialog hide. Transcript showCR:'foo'])
-		after:(dialog okButton).
+                        label:'foo' 
+                        action:[dialog hide. Transcript showCR:'foo'])
+                after:(dialog okButton).
      dialog open.
      dialog accepted ifTrue:[Transcript showCR:'yes'].
     "
@@ -3862,9 +3886,9 @@
      dialog addAbortButton.
      dialog addOkButton.
      dialog addButton:(Button 
-			label:'foo' 
-			action:[dialog hide. Transcript showCR:'foo'])
-		after:(dialog abortButton).
+                        label:'foo' 
+                        action:[dialog hide. Transcript showCR:'foo'])
+                after:(dialog abortButton).
      dialog open.
      dialog accepted ifTrue:[Transcript showCR:'yes'].
     "
@@ -3875,9 +3899,9 @@
      dialog addAbortButton.
      dialog addOkButton.
      dialog addButton:(Button 
-			label:'foo' 
-			action:[dialog hide. Transcript showCR:'foo'])
-		after:nil.
+                        label:'foo' 
+                        action:[dialog hide. Transcript showCR:'foo'])
+                after:nil.
      dialog open.
      dialog accepted ifTrue:[Transcript showCR:'yes'].
     "
@@ -3894,10 +3918,10 @@
 
     buttonPanel addSubView:aButton before:someOtherButtonOrNil.
     buttonPanel subViews size > 1 ifTrue:[
-	buttonPanel horizontalLayout:#fitSpace.
+        buttonPanel horizontalLayout:#fitSpace.
     ].
     (h := (aButton heightIncludingBorder + (ViewSpacing * 2))) > buttonPanel topInset ifTrue:[
-	 buttonPanel topInset:h negated
+         buttonPanel topInset:h negated
     ].
     needResize := true.
     ^ aButton
@@ -3909,9 +3933,9 @@
      dialog addAbortButton.
      dialog addOkButton.
      dialog addButton:(Button 
-			label:'foo' 
-			action:[dialog hide. Transcript showCR:'foo'])
-		before:(dialog okButton).
+                        label:'foo' 
+                        action:[dialog hide. Transcript showCR:'foo'])
+                before:(dialog okButton).
      dialog open.
      dialog accepted ifTrue:[Transcript showCR:'yes'].
     "
@@ -3922,9 +3946,9 @@
      dialog addAbortButton.
      dialog addOkButton.
      dialog addButton:(Button 
-			label:'foo' 
-			action:[dialog hide. Transcript showCR:'foo'])
-		before:nil.
+                        label:'foo' 
+                        action:[dialog hide. Transcript showCR:'foo'])
+                before:nil.
      dialog open.
      dialog accepted ifTrue:[Transcript showCR:'yes'].
     "
@@ -5594,17 +5618,17 @@
     |fields buttons|
 
     tabableElements isNil ifTrue:[
-	fields := #()
+        fields := #()
     ] ifFalse:[
-	fields := tabableElements
+        fields := tabableElements
     ].
     buttonPanel notNil ifTrue:[
-	buttons := buttonPanel subViews.
-	buttons notNil ifTrue:[
-	    fields := fields , buttonPanel subViews
-	]
+        buttons := buttonPanel subViews.
+        buttons notNil ifTrue:[
+            fields := fields , buttonPanel subViews
+        ]
     ].
-    ^ fields select:[:aField | aField realized].
+    ^ fields "/ select:[:aField | aField realized and:[aField enabled]].
 
     "Modified: 31.5.1996 / 22:05:58 / cg"
 !
@@ -5924,6 +5948,6 @@
 !DialogBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.132 1999-03-09 18:11:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.133 1999-04-15 12:33:52 cg Exp $'
 ! !
 DialogBox initialize!