--- a/DataSetColumn.st Thu Aug 22 15:54:50 2013 +0200
+++ b/DataSetColumn.st Fri Aug 23 11:29:49 2013 +0200
@@ -1185,9 +1185,10 @@
only the first numberOfRowsProbedForColumnSize are probed,
in case the access is expensive (dataBase apps)
If the descriptor defines a height, that is used, and the items are not probed at all.
- If the descriptors height is -1 or #fontHeight, that is used.
+ If the descriptor's height is -1 or #fontHeight, that is used.
+ If the descriptor's height is #askFirst, only the first columns height is probed.
"
- |h end bE editorType|
+ |h end bE editorType row1|
(h := description height) == 0 ifTrue:[
containsText ifTrue:[
@@ -1200,8 +1201,13 @@
]
]
] ifFalse:[
- (h == #fontHeight or:[ h < 0 ]) ifTrue:[
- h := dataSet font heightOn:dataSet device.
+ ((h == #first) or:[ h == #askFirst]) ifTrue:[
+ row1 := dataSet at:1.
+ h := self heightOfLabel:(self shownValueForRow:row1 rowNr:1)
+ ] ifFalse:[
+ (h == #fontHeight or:[ h isNumber and:[h < 0] ]) ifTrue:[
+ h := dataSet font heightOn:dataSet device.
+ ].
].
].
@@ -1223,7 +1229,7 @@
aLabel isNil ifTrue:[ ^ 0 ].
- ((h := description height) == #fontHeight or:[ h < 0 ]) ifTrue:[
+ ((h := description height) == #fontHeight or:[ h isNumber and:[h < 0] ]) ifTrue:[
^ dataSet font heightOn:dataSet device
].
@@ -1346,10 +1352,10 @@
!DataSetColumn class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.139 2013-06-25 21:23:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.140 2013-08-23 09:29:49 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.139 2013-06-25 21:23:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.140 2013-08-23 09:29:49 cg Exp $'
! !