Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        static void PrintScrollInformation()
        {
            ScrollInfo scrollInfo       = editor.GetScrollInfo(ScrollInfoMask.SIF_RANGE | ScrollInfoMask.SIF_TRACKPOS | ScrollInfoMask.SIF_PAGE, ScrollInfoBar.SB_VERT);
            var        scrollRatio      = (double)scrollInfo.nTrackPos / (scrollInfo.nMax - scrollInfo.nPage);
            var        scrollPercentage = Math.Min(scrollRatio, 1) * 100;

            editor.ReplaceSel($@"The maximum row in the current document was {scrollInfo.nMax+1}.
A maximum of {scrollInfo.nPage} rows is visible at a time.
The current scroll ratio is {Math.Round(scrollPercentage, 2)}%.
");
        }