SelectionInListView.st
changeset 6257 67c2af78181e
parent 6191 315e21126832
child 6260 69259ae49d3f
equal deleted inserted replaced
6256:76350fb3380f 6257:67c2af78181e
  2818     ^ false
  2818     ^ false
  2819 ! !
  2819 ! !
  2820 
  2820 
  2821 !SelectionInListView methodsFor:'help'!
  2821 !SelectionInListView methodsFor:'help'!
  2822 
  2822 
  2823 flyByHelpTextAt:aPoint
  2823 helpTextAt:aPoint
  2824     "ask the line for its help text"
  2824     "ask the line for its help text"
  2825      
  2825      
  2826     |lineNr|
  2826     |lineNr|
  2827 
  2827 
  2828     lineNr := self lineAtY:aPoint y.
  2828     lineNr := self lineAtY:aPoint y.
  2829     lineNr notNil ifTrue:[
  2829     lineNr notNil ifTrue:[
  2830         ^ self flyByHelpTextForLine:lineNr
  2830         ^ self helpTextForLine:lineNr
  2831     ].
  2831     ].
  2832     ^ nil
  2832     ^ nil
  2833 
  2833 
  2834     "Modified (comment): / 18-07-2017 / 13:32:04 / cg"
  2834     "Modified (comment): / 18-07-2017 / 13:32:04 / cg"
  2835 !
  2835 !
  2836 
  2836 
  2837 flyByHelpTextForLine:lineNr
  2837 helpTextForLine:lineNr
  2838     "the fallback here is to ask the item if it is not a string,
  2838     "the fallback here is to ask the item if it is not a string,
  2839      otherwise, return the full label string
  2839      otherwise, return the full label string
  2840      for lines which are clipped (longer than the view's width)"
  2840      for lines which are clipped (longer than the view's width)"
  2841      
  2841      
  2842     |item len text|
  2842     |item len text|
  2843 
  2843 
  2844     item := self at:lineNr.
  2844     item := self at:lineNr.
  2845     item isString ifFalse:[
  2845     item isString ifFalse:[
  2846         text := item perform:#flyByHelpText ifNotUnderstood:nil.
  2846         text := item perform:#helpText ifNotUnderstood:nil.
  2847         text notNil ifTrue:[
  2847         text notNil ifTrue:[
  2848             ^ text
  2848             ^ text
  2849         ].    
  2849         ].    
  2850     ].
  2850     ].
  2851     
  2851