Example #1
0
 private void rtxMain_Resize(object sender, EventArgs e)
 {
     ReentryBlock.Work(delegate()
     {
         updateTextBoxHeight();
         updateVisibleLineCount();
         updateFirstVisibleLine();
         pnlLineNumber.Invalidate();
         rtxMain.Invalidate();
     }, MethodBase.GetCurrentMethod());
 }
Example #2
0
        private void rtxMain_VScroll(object sender, EventArgs e)
        {
            if (disableScrollEvent)
            {
                return;
            }

            ReentryBlock.Work(delegate()
            {
                updateFirstVisibleLine();
                pnlLineNumber.Invalidate();
                //POINT point = new POINT();
                //SendMessage(rtxMain.Handle.ToInt32(), EM_GETSCROLLPOS, 0, ref point);
                //if (firstVisibleLine < lineCount && (point.y % textHeight != 0 || point.y > textHeight * (firstVisibleLine - 1)))
                //{
                //    FirstVisibleLine += 1;
                //    point.y = textHeight * firstVisibleLine;
                //    rtxMain.SetScrollPos(point.x, point.y);
                //}
            }, MethodBase.GetCurrentMethod());
        }