EditField.st
changeset 1751 f29c3312beaf
parent 1733 c5139b7402f0
child 1781 5169563515ef
equal deleted inserted replaced
1750:d87cc464fde2 1751:f29c3312beaf
  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'!
  2004 ! !
  2020 ! !
  2005 
  2021 
  2006 !EditField class methodsFor:'documentation'!
  2022 !EditField class methodsFor:'documentation'!
  2007 
  2023 
  2008 version
  2024 version
  2009     ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.115 1999-02-09 18:28:22 cg Exp $'
  2025     ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.116 1999-02-20 11:46:36 cg Exp $'
  2010 ! !
  2026 ! !