'From Squeak3.4gamma of ''7 January 2003'' [latest update: #5170] on 26 March 2003 at 11:03:58 pm'! "Change Set: Select first filtered menu item Date: 26 March 2003 Author: Chris Muller I absolutely love the filtered menu list. Use of the keyboard puts the burden of scanning for desired menu items on the computer instead of on my tired eyes. This simple enhancement streamlines the use of the keyboard to the last degree by selecting the first of the filtered items. Instead of reaching for the arrow keys, your desired selection is highlighed much sooner, allowing you to smack the Enter key and keep your hands in the typing position. Try it, you can go faster!!"! !MenuMorph methodsFor: 'keyboard control' stamp: 'cmm 3/26/2003 22:52'! displayFiltered: evt | matchStr allItems isMatch matches feedbackMorph | matchStr _ self valueOfProperty: #matchString. allItems _ self submorphs select: [:m | m isKindOf: MenuItemMorph]. matches _ allItems select: [:m | isMatch _ matchStr isEmpty or: [ m contents includesSubstring: matchStr caseSensitive: false]. m isEnabled: isMatch. isMatch]. feedbackMorph _ self valueOfProperty: #feedbackMorph. feedbackMorph ifNil: [ feedbackMorph _ TextMorph new autoFit: true; color: Color darkGray. self addLine; addMorphBack: feedbackMorph lock. self setProperty: #feedbackMorph toValue: feedbackMorph. self fullBounds. "Lay out for submorph adjacency"]. feedbackMorph contents: '<', matchStr, '>'. matchStr isEmpty ifTrue: [ feedbackMorph delete. self submorphs last delete. self removeProperty: #feedbackMorph]. matches size >= 1 ifTrue: [ self selectItem: matches first event: evt] ! !