void aButton_Click(object sender, EventArgs e)
        {
            Form form = FindForm();

            if ((form != null) && (form is StoryEditor))
            {
                StoryEditor     aSE  = (StoryEditor)form;
                ToolStripButton tssb = (ToolStripButton)sender;

                // the button may have the extra indicator that there's a tooltip.
                string strJumpTarget = tssb.Text;
                int    nIndLen       = CstrTooltipIndicator.Length;
                if (strJumpTarget.Substring(strJumpTarget.Length - nIndLen, nIndLen) == CstrTooltipIndicator)
                {
                    strJumpTarget = strJumpTarget.Substring(0, strJumpTarget.Length - nIndLen);
                }

                aSE.SetNetBibleVerse(strJumpTarget);
                aSE.FocusOnVerse(_ctrlVerse.VerseNumber, true, true);

                // if we aren't already in some text box, then set the focus on the
                //  parent verse form so that scroll wheel can work
                if (CtrlTextBox._inTextBox == null)
                {
                    _ctrlVerse.Focus();
                }
            }
        }
Example #2
0
        public new bool Focus()
        {
            _ctrlVerseParent.Focus();
            base.Focus();
            Visible = true;
            if (_SelectionStart + _SelectionLength <= Text.Length)
            {
                SelectionStart  = _SelectionStart;
                SelectionLength = _SelectionLength;
            }

            return(true);
        }