Re: "prompted selection" ?
From: Jay Freedman (jay.freedman_at_verizon.net)
Date: 05/05/04
- Next message: Timothy Golden: "modeless UI for multiple documents"
- Previous message: Jay Freedman: "Re: Set focus when invalid data entered"
- In reply to: Old Lars: ""prompted selection" ?"
- Next in thread: Old Lars: "Re: "prompted selection" ?"
- Reply: Old Lars: "Re: "prompted selection" ?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 5 May 2004 10:48:07 -0400
The behavior you described is controlled by the .MatchEntry property of the
ComboBox or ListBox control. The possible values, as listed in the Help,
are:
fmMatchEntryFirstLetter = 0
Basic matching. The control searches for the next entry that starts with the
character entered. Repeatedly typing the same letter cycles through all
entries beginning with that letter.
fmMatchEntryComplete = 1
Extended matching. As each character is typed, the control searches for an
entry matching all characters entered (default).
fmMatchEntryNone = 2
No matching.
I don't have a Macintosh to look at, but it's possible that the controls
there default to one of the other two values -- probably
fmMatchEntryFirstLetter, or 0 -- instead of fmMatchEntryComplete. You can
put a statement like this in either the UserForm_Initialize() or the
UserForm_Activate() procedure to force it to match the way you want:
cbxList.MatchEntry = fmMatchEntryComplete
-- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Old Lars wrote: > In a template that I've inherited there are lots of selection box > forms. These forms have the behaviour that when the user begins typing > a value in the entry field, the list below the field scrolls down to > the first entry that matches what's been typed so far, and the entry > field fills itself in with that value as well. As more of the desired > value is typed in, this "prompted selection" refines itself to a more > precise match among the available values, if possible. > > So as I begin by typing "c", the first entry in my list, "CAP", pops > up. (The list also scrolls to that "CAP", if I have the list visible.) > Then, as I continue with the next letter, "h", the prompted entry > switches to "CHAP". Next, I type "i", and the entry switches to > "CHIN". And so on. > > I have two questions: > > 1) What is this behaviour called? I've been using it for years and > find it useful, but I don't know how to refer to it. > > 2) Why does this work on Windows but not on Macintosh? (It's exactly > the same template, carefully written to be dual-platform.) > Specifically, it's always worked on versions of Word, from Word 2000 > back to at least Word 95, but never on Mac, from Word 2001 back to > Word 6.0. (Those are the versions that I've had on my PC and Mac.) I > don't know if I did anything special to enable it, either as a user or > as the hack programmer trying to hold this template together. > > Thanks ---
- Next message: Timothy Golden: "modeless UI for multiple documents"
- Previous message: Jay Freedman: "Re: Set focus when invalid data entered"
- In reply to: Old Lars: ""prompted selection" ?"
- Next in thread: Old Lars: "Re: "prompted selection" ?"
- Reply: Old Lars: "Re: "prompted selection" ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|