Esempio n. 1
0
        void VerticalScrollBar_Scroll(object sender, ScrollEventArgs e)
        {
            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                TopRow    = View.GetViewportTopRow(ActiveSheetIndex, 0);
                BottomRow = View.GetViewportBottomRow(ActiveSheetIndex, 0);

                Invalidate();
            }
        }
Esempio n. 2
0
        protected override void OnMouseWheel(MouseEventArgs e)
        {
            base.OnMouseWheel(e);

            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                TopRow    = View.GetViewportTopRow(ActiveSheetIndex, 0);
                BottomRow = View.GetViewportBottomRow(ActiveSheetIndex, 0);

                Invalidate();
            }
        }
Esempio n. 3
0
        protected override bool IsInputKey(Keys keyData)
        {
            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                TopRow      = View.GetViewportTopRow(ActiveSheetIndex, 0);
                BottomRow   = View.GetViewportBottomRow(ActiveSheetIndex, 0);
                LeftColumn  = View.GetViewportLeftColumn(ActiveSheetIndex, 0);
                RightColumn = View.GetViewportRightColumn(ActiveSheetIndex, 0);

                Invalidate();
            }

            return(base.IsInputKey(keyData));
        }
Esempio n. 4
0
        protected override void OnActiveSheetChanged(EventArgs e)
        {
            base.OnActiveSheetChanged(e);

            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                TopRow      = View.GetViewportTopRow(ActiveSheetIndex, 0);
                BottomRow   = View.GetViewportBottomRow(ActiveSheetIndex, 0);
                LeftColumn  = View.GetViewportLeftColumn(ActiveSheetIndex, 0);
                RightColumn = View.GetViewportRightColumn(ActiveSheetIndex, 0);
            }

            UpdateColumnsWidth();
            UpdateRowsHeight();

            Invalidate();
        }
Esempio n. 5
0
        void Sheet_PropertyChanged(object sender, SheetViewPropertyChangeEventArgs e)
        {
            if (e.PropertyName == "PrintInfo")
            {
                Invalidate();
            }
            else if (e.PropertyName == "RowCount" || e.PropertyName == "ColumnCount")
            {
                if (ActiveSheet.ContainingViews.Length > 0)
                {
                    SpreadView View = ActiveSheet.ContainingViews[0];
                    TopRow      = View.GetViewportTopRow(ActiveSheetIndex, 0);
                    BottomRow   = View.GetViewportBottomRow(ActiveSheetIndex, 0);
                    LeftColumn  = View.GetViewportLeftColumn(ActiveSheetIndex, 0);
                    RightColumn = View.GetViewportRightColumn(ActiveSheetIndex, 0);
                }

                UpdateColumnsWidth();
                UpdateRowsHeight();

                Invalidate();
            }
        }