if i make a colum fully visible using:
widget makeColumnVisible: 10 forceFullyVisible: true.
then i check if the column has been made fully visible by doing:
widget isColumnFullyVisible: 10
it returns false. On the window, i can see that it did make the column fully visible.
this happens in all cases where column is made exposed to the right of the window or the left.
looking into code, i can see a bug:
- Code: Select all
"Answer true if the column at anIndex is fully visible on the screen, false if it is not."
| col colX |
self exposedColumns isEmpty ifTrue: [^false].
col := self columns at: anIndex.
colX := col scrolledX - self horizontalScrollOffset.
^colX > 0 and: [
(self isColumnPartiallyVisible: anIndex) and: [
colX + col widthWithSeparator + self totalEmphasis < self workWidth and: [
col leftClip isNil]]]
colX > 0 should be colX >= 0and
colX + col widthWithSeparator + self totalEmphasis < self workWidth
colX + col widthWithSeparator + self totalEmphasis <= self workWidth
Actually, when the api makes the colum visible, the edge of the cell coinsides with the scrollbar or the left margin (depeding on how the cell was made visible) - and this creates a boundary condition for this code above.
is there a different approach that i can use here? maybe make visible and then code to make the cell a "bit more" visible?