1955 "Created: 24.7.1997 / 18:23:15 / cg" |
1955 "Created: 24.7.1997 / 18:23:15 / cg" |
1956 ! ! |
1956 ! ! |
1957 |
1957 |
1958 !EditField methodsFor:'scrolling'! |
1958 !EditField methodsFor:'scrolling'! |
1959 |
1959 |
1960 makeColVisible:col inLine:line |
1960 makeColVisible:col inLine:lineNr |
1961 "dont scroll for the cursor, if its behond the text and a lengthLimit |
1961 "dont scroll for the cursor, if its behond the text and a lengthLimit |
1962 is present." |
1962 is present." |
1963 |
1963 |
1964 lengthLimit notNil ifTrue:[ |
1964 |wText| |
1965 (col == cursorCol and:[col > lengthLimit]) ifTrue:[ |
1965 |
1966 ^ super makeColVisible:lengthLimit inLine:line |
1966 (lengthLimit notNil |
1967 ] |
1967 and:[col == cursorCol |
1968 ]. |
1968 and:[col > lengthLimit]]) ifTrue:[ |
1969 ^ super makeColVisible:col inLine:line |
1969 super makeColVisible:lengthLimit inLine:lineNr |
|
1970 ] ifFalse:[ |
|
1971 super makeColVisible:col inLine:lineNr |
|
1972 ]. |
|
1973 |
|
1974 "/ new: |
|
1975 "/ care to make the most possible visible |
|
1976 leftOffset > 0 ifTrue:[ |
|
1977 wText := self widthOfLine:lineNr. |
|
1978 wText <= self innerWidth ifTrue:[ |
|
1979 self scrollHorizontalTo:0 |
|
1980 ] ifFalse:[ |
|
1981 wText < (leftOffset+self innerWidth) ifTrue:[ |
|
1982 self scrollHorizontalTo:(wText - self innerWidth) |
|
1983 ] |
|
1984 ] |
|
1985 ] |
1970 |
1986 |
1971 "Modified: 6.9.1995 / 13:57:53 / claus" |
1987 "Modified: 6.9.1995 / 13:57:53 / claus" |
1972 ! ! |
1988 ! ! |
1973 |
1989 |
1974 !EditField methodsFor:'selections'! |
1990 !EditField methodsFor:'selections'! |