formatSelector
authorwerner
Fri, 02 Apr 2004 16:28:43 +0200
changeset 1824 bbc564bddd31
parent 1823 de7fbe3fde6d
child 1825 58bcec422efd
formatSelector
DataSetBuilder.st
--- a/DataSetBuilder.st	Fri Apr 02 15:57:23 2004 +0200
+++ b/DataSetBuilder.st	Fri Apr 02 16:28:43 2004 +0200
@@ -215,6 +215,9 @@
 #fileSaveAs
 'Specify class/selector and install the column description'
 
+#formatFormatSelector
+'Selector sent to the row to get the Format string.'
+
 #formatInputType
 'A type converter symbol used by the input field.'
 
@@ -222,7 +225,7 @@
 'Maximum size of the string which can be typed in. 0 or nil means unlimited.'
 
 #formatTextFormat
-'Format string specifying the output format of the cell text. In this release, only numbers are supported (for example: 0.0000).'
+'Format string specifying the output format of the cell text. (for example: %5.4f gives 0.0000).'
 
 #frameColumnWidth
 'Width (fixed or relative) of a column (optional).'
@@ -800,7 +803,7 @@
           label: 'DataSet Details'
           name: 'DataSet Details'
           min: (Point 10 10)
-          bounds: (Rectangle 14 46 402 338)
+          bounds: (Rectangle 0 0 388 149)
         )
         component: 
        (SpecCollection
@@ -808,7 +811,7 @@
            (FramedBoxSpec
               label: 'Input Format'
               name: 'framedBox1'
-              layout: (LayoutFrame 0 0.0 3 0 0 1.0 127 0)
+              layout: (LayoutFrame 0 0.0 3 0 0 1.0 149 0)
               labelPosition: topLeft
               component: 
              (SpecCollection
@@ -817,6 +820,7 @@
                     label: 'Input Type:'
                     name: 'typeLabel'
                     layout: (AlignmentOrigin 115 0 26 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                   )
                  (ComboListSpec
@@ -831,11 +835,13 @@
                       numberOrNil symbolOrNil
                     )
                     useIndex: false
+                    hidePullDownMenuButton: false
                   )
                  (LabelSpec
                     label: 'Max Size:'
                     name: 'sizeLabel'
                     layout: (AlignmentOrigin 115 0 52 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                   )
                  (InputFieldSpec
@@ -855,6 +861,7 @@
                     label: 'Text Format:'
                     name: 'formatLabel'
                     layout: (AlignmentOrigin 115 0 77 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                   )
                  (InputFieldSpec
@@ -869,6 +876,26 @@
                     modifiedChannel: modifiedChannel
                     acceptOnPointerLeave: false
                   )
+                 (LabelSpec
+                    label: 'Format Selector:'
+                    name: 'formatSelectorLabel'
+                    layout: (AlignmentOrigin 115 0 103 0 1 0.5)
+                    translateLabel: true
+                    resizeForLabel: true
+                  )
+                 (InputFieldSpec
+                    name: 'formatSelector'
+                    layout: (LayoutFrame 118 0 92 0 3 1.0 114 0)
+                    activeHelpKey: formatTextFormat
+                    tabable: true
+                    model: formatSelector
+                    group: inputGroup
+                    formatString: ''
+                    acceptOnLostFocus: false
+                    acceptChannel: acceptChannel
+                    modifiedChannel: modifiedChannel
+                    acceptOnPointerLeave: false
+                  )
                  )
                
               )
@@ -2585,6 +2612,15 @@
     modalOpened := false.
     listOfSpecViews := Array new:(self class slices size).
 
+!
+
+setDefaultValuesInNewColumn:aDataSetColumnSpec
+    aDataSetColumnSpec readSelector: #'valueAtColumnIndex:'.
+    aDataSetColumnSpec writeSelector: #'valueAtColumnIndex:put:'.
+    aDataSetColumnSpec backgroundSelector: #'bgAtRowIndex:columnIndex:'.
+    aDataSetColumnSpec foregroundSelector: #'fgAtRowIndex:columnIndex:'.
+    aDataSetColumnSpec selectSelector: #'selectAtColumnIndex:'.
+    aDataSetColumnSpec editorType: #InputField.
 ! !
 
 !DataSetBuilder methodsFor:'private'!