protected override void EnsureDefaultSelection() { if (RootBox != null) { RootBox.MakeSimpleSel(true, true, true, true); } }
/// <summary> /// Call this when done adding paragraphs. The typical calling sequence is /// Clear(), AddPara() x n, CompleteSetText(). /// </summary> public void CompleteSetText() { CheckDisposed(); int[] rghvo = new int[m_hvoNextPara - khvoFirstPara]; for (int i = 0; i < rghvo.Length; ++i) { rghvo[i] = i + khvoFirstPara; } m_cd.CacheVecProp(m_hvoRoot, (int)SampleTags.ktagTextParas, rghvo, rghvo.Length); RootBox.Reconstruct(); RootBox.MakeSimpleSel(true, true, false, true); }
public void ShowForm() { Visible = true; if (!IsHandleCreated) { // making a selection should help us get a handle created, if it's not already try { RootBox.MakeSimpleSel(true, true, false, true); } catch (COMException) { // We ignore failures since the text window may be empty, in which case making a // selection is impossible. } } else { CallLayout(); } AutoScrollPosition = new Point(0, 0); }