SIL.FieldWorks.Common.Widgets.FwTextBox.ApplyWS C# (CSharp) Method

ApplyWS() public method

Applies the specified writing system to the current selection
public ApplyWS ( int hvoWs ) : void
hvoWs int The ID of the writing system to apply
return void
		public void ApplyWS(int hvoWs)
		{
			CheckDisposed();

			m_innerFwTextBox.ApplyWS(hvoWs);
			if (m_innerFwTextBox.Tss.Length == 0)
			{
				// Need to also set the properties on the string. This allows searching for
				// writing system only.
				ITsStrBldr bldr = m_innerFwTextBox.Tss.GetBldr();
				bldr.SetIntPropValues(0, 0, (int)FwTextPropType.ktptWs, 0, hvoWs);
				m_innerFwTextBox.Tss = bldr.GetString();
			}
		}

Usage Example

Ejemplo n.º 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Applies the specified writing system to the current selection of the Tss string in
		/// the specified Tss edit control
		/// </summary>
		/// <param name="fwTextBox">The Tss edit control whose selection should have the
		/// specified style applied to it.</param>
		/// <param name="hvoWs">The ID of the writing system to apply</param>
		/// ------------------------------------------------------------------------------------
		public void ApplyWS(FwTextBox fwTextBox, int hvoWs)
		{
			CheckDisposed();

			fwTextBox.ApplyWS(hvoWs);
			if (chkMatchWS.Enabled)
				chkMatchWS.Checked = true;
			fwTextBox.Focus();
		}
All Usage Examples Of SIL.FieldWorks.Common.Widgets.FwTextBox::ApplyWS