예제 #1
0
        public DataGridViewSummary()
        {
            InitializeComponent();

            refBox = new TextBox();
            panel = new Panel();
            spacePanel = new Panel();
            hScrollBar = new HScrollBar();

            summaryControl = new SummaryControlContainer(this);
            summaryControl.VisibilityChanged += new EventHandler(summaryControl_VisibilityChanged);

            Resize += new EventHandler(DataGridControlSum_Resize);
            RowHeadersWidthChanged += new EventHandler(DataGridControlSum_Resize);
            ColumnAdded += new DataGridViewColumnEventHandler(DataGridControlSum_ColumnAdded);
            ColumnRemoved += new DataGridViewColumnEventHandler(DataGridControlSum_ColumnRemoved);

            hScrollBar.Scroll += new ScrollEventHandler(hScrollBar_Scroll);
            hScrollBar.VisibleChanged += new EventHandler(hScrollBar_VisibleChanged);

            hScrollBar.Top += summaryControl.Bottom;
            hScrollBar.Minimum = 0;
            hScrollBar.Maximum = 0;
            hScrollBar.Value = 0;
        }
예제 #2
0
        public DataGridViewSummary()
        {
            InitializeComponent();

            refBox     = new TextBox();
            panel      = new Panel();
            spacePanel = new Panel();
            hScrollBar = new HScrollBar();

            summaryControl = new SummaryControlContainer(this);
            summaryControl.VisibilityChanged += new EventHandler(summaryControl_VisibilityChanged);

            Resize += new EventHandler(DataGridControlSum_Resize);
            RowHeadersWidthChanged += new EventHandler(DataGridControlSum_Resize);
            ColumnAdded            += new DataGridViewColumnEventHandler(DataGridControlSum_ColumnAdded);
            ColumnRemoved          += new DataGridViewColumnEventHandler(DataGridControlSum_ColumnRemoved);

            hScrollBar.Scroll         += new ScrollEventHandler(hScrollBar_Scroll);
            hScrollBar.VisibleChanged += new EventHandler(hScrollBar_VisibleChanged);

            hScrollBar.Top    += summaryControl.Bottom;
            hScrollBar.Minimum = 0;
            hScrollBar.Maximum = 0;
            hScrollBar.Value   = 0;
        }