TypeAheadSupportVc is a view constructor used to display a (typically real) object reference property in a mode that allows the user to type part of an identifying string in order to make a selection. Typical call code: // Member variable of main VC, typically. TypeAheadSupportVc m_tasvc; // (In constructor of main VC, or similar place.) m_tasvc = new TypeAheadSupportVc((int)LexSense.LexSenseTags.kflidSemanticDomain, m_cache); m_tasvc.InitXXX(...); // Optional, choose any appropriate method if further Init required. // (As part of Display method or similar, where type-ahead property is wanted. m_tasvc.Insert(IVwEnv vwenv, int hvo); // atomic m_tasbc.InsertSeq(IVwEnv vwenv, int hvo); // sequence (or collection) -- not yet fully implemented? At least not tested. To make things work properly, the client must also override OnKeyPress and (after checking that no update is in progress) arrange to call m_tasvc.OnKeyPress(EditingHelper, e, ModifierKeys, m_vwGraphics). If this returns true, the normal call to base.OnKeyPress should be omitted. protected override void OnKeyPress(KeyPressEventArgs e) { if (DataUpdateMonitor.IsUpdateInProgress(DataAccess)) return; //throw this event away using (new HoldGraphics(this)) { if (m_vc.TasVc.OnKeyPress(EditingHelper, e, ModifierKeys, m_vwGraphics)) return; } base.OnKeyPress(e); } The client should also override SelectionChanged and (among any other behavior) calle m_tasvc.SelectionChanged(rootb, sel). This is used to expand any selection that covers more than one item in the sequence to cover the whole of the items partly selected. Finally, the client should override OnLoseFocus and (among any other behavior) call m_tasvc.LoseFocus(rootb); Similarly OnGotFocus(rootb).
Inheritance: SIL.FieldWorks.Common.RootSites.VwBaseVc
			/// <summary>
			/// Executes in two distinct scenarios.
			///
			/// 1. If disposing is true, the method has been called directly
			/// or indirectly by a user's code via the Dispose method.
			/// Both managed and unmanaged resources can be disposed.
			///
			/// 2. If disposing is false, the method has been called by the
			/// runtime from inside the finalizer and you should not reference (access)
			/// other managed objects, as they already have been garbage collected.
			/// Only unmanaged resources can be disposed.
			/// </summary>
			/// <param name="disposing"></param>
			/// <remarks>
			/// If any exceptions are thrown, that is fine.
			/// If the method is being done in a finalizer, it will be ignored.
			/// If it is thrown by client code calling Dispose,
			/// it needs to be handled by fixing the bug.
			///
			/// If subclasses override this method, they should call the base implementation.
			/// </remarks>
			protected override void Dispose(bool disposing)
			{
				//Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
				// Must not be run more than once.
				if (IsDisposed)
					return;

				base.Dispose(disposing);

				if (disposing)
				{
					// Dispose managed resources here.
					if (m_tasvc != null)
						m_tasvc.Dispose();
				}

				// Dispose unmanaged resources here, whether disposing is true or false.
				m_tasvc = null;
			}
			public AtomicRefTypeAheadVc(int flid, FdoCache cache)
			{
				m_tasvc = new TypeAheadSupportVc(flid, cache);
			}