Example #1
0
        void HorizontalScrollBar_Scroll(object sender, ScrollEventArgs e)
        {
            if (ActiveSheet != null && ActiveSheet.ContainingViews.Length > 0)
            {
                SpreadView View = ActiveSheet.ContainingViews[0];
                LeftColumn  = View.GetViewportLeftColumn(ActiveSheetIndex, 0);
                RightColumn = View.GetViewportRightColumn(ActiveSheetIndex, 0);

                Invalidate();
            }
        }
Example #2
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));
        }
Example #3
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();
        }
Example #4
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();
            }
        }