protected Select ( bool directed, bool forward ) : void | ||
directed | bool | true to specify the direction of the control to select; otherwise, false. |
forward | bool | true to move forward in the tab order; false to move backward in the tab order. |
return | void |
protected void m_tbForm_TextChanged(object sender, System.EventArgs e) { if (m_skipCheck) { return; } bool fWantSelect = true; string unSelText = AdjustUnselectedText(out fWantSelect); int selLocation = unSelText.Length; ResetMatches(unSelText); // Unnecessary focus changes can cause loss of characters with Yi and Indic languages. if (fWantSelect && (m_tbForm.SelectionStart != selLocation || m_tbForm.SelectionLength != 0)) { m_tbForm.Select(selLocation, 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; SetFormatLabels(); fwTextBox.Select(); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Applies the specified style 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="sStyle">The name of the style to apply</param> /// ------------------------------------------------------------------------------------ public void ApplyStyle(FwTextBox fwTextBox, string sStyle) { CheckDisposed(); // Apply the specified style to the current selection if (sStyle.ToLowerInvariant() == FwCoreDlgs.kstidNoStyle.ToLowerInvariant()) sStyle = null; else if (sStyle.ToLowerInvariant() == StyleUtils.DefaultParaCharsStyleName.ToLowerInvariant()) sStyle = FwStyleSheet.kstrDefaultCharStyle; fwTextBox.ApplyStyle(sStyle); SetFormatLabels(); fwTextBox.Select(); }