本文整理汇总了C#中System.Windows.Forms.DataGridView.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# DataGridView.Hide方法的具体用法?C# DataGridView.Hide怎么用?C# DataGridView.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.DataGridView
的用法示例。
在下文中一共展示了DataGridView.Hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddGridView
//.........这里部分代码省略.........
_income_Rice.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_income_Rice.ColumnHeadersHeight = 30;
_income_Rice.Font = new Font("Microsoft Sans Serif", 12);
_income_Rice.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _income_Help ----------------------------------
_income_Help.Size = new Size(600, 392);
_income_Help.Location = new Point(350, 20);
_income_Help.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_income_Help.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_income_Help.RowTemplate.Height = 30;
_income_Help.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_income_Help.ColumnHeadersHeight = 30;
_income_Help.Font = new Font("Microsoft Sans Serif", 12);
_income_Help.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _income_Car ----------------------------------
_income_Car.Size = new Size(600, 392);
_income_Car.Location = new Point(350, 20);
_income_Car.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_income_Car.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_income_Car.RowTemplate.Height = 30;
_income_Car.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_income_Car.ColumnHeadersHeight = 30;
_income_Car.Font = new Font("Microsoft Sans Serif", 12);
_income_Car.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _income_Term ----------------------------------
_income_Term.Size = new Size(600, 392);
_income_Term.Location = new Point(350, 20);
_income_Term.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_income_Term.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_income_Term.RowTemplate.Height = 30;
_income_Term.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_income_Term.ColumnHeadersHeight = 30;
_income_Term.Font = new Font("Microsoft Sans Serif", 12);
_income_Term.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _income_Other ----------------------------------
_income_Other.Size = new Size(600, 392);
_income_Other.Location = new Point(350, 20);
_income_Other.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_income_Other.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_income_Other.RowTemplate.Height = 30;
_income_Other.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_income_Other.ColumnHeadersHeight = 30;
_income_Other.Font = new Font("Microsoft Sans Serif", 12);
_income_Other.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _income_Interest ----------------------------------
_income_Interest.Size = new Size(600, 392);
_income_Interest.Location = new Point(350, 20);
_income_Interest.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_income_Interest.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_income_Interest.RowTemplate.Height = 30;
_income_Interest.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_income_Interest.ColumnHeadersHeight = 30;
_income_Interest.Font = new Font("Microsoft Sans Serif", 12);
_income_Interest.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
#endregion
// Draw DGVS --------------------------------------------------
W_IncomeTab.Controls.Add(income);
W_IncomeTab.Controls.Add(_income_Thanks);
currentTab = _income_Thanks;
W_IncomeTab.Controls.Add(_income_10);
W_IncomeTab.Controls.Add(_income_Cell);
W_IncomeTab.Controls.Add(_income_Archi);
W_IncomeTab.Controls.Add(_income_Mission);
W_IncomeTab.Controls.Add(_income_Rice);
W_IncomeTab.Controls.Add(_income_Help);
W_IncomeTab.Controls.Add(_income_Car);
W_IncomeTab.Controls.Add(_income_Term);
W_IncomeTab.Controls.Add(_income_Other);
W_IncomeTab.Controls.Add(_income_Interest);
_income_10.Hide();
_income_Cell.Hide();
_income_Archi.Hide();
_income_Mission.Hide();
_income_Rice.Hide();
_income_Help.Hide();
_income_Car.Hide();
_income_Term.Hide();
_income_Other.Hide();
_income_Interest.Hide();
W_IncomeTab.Controls.Add(income_total);
W_IncomeTab.Controls.Add(_income_total);
}
示例2: AddGridView
//.........这里部分代码省略.........
_spend_Edu.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_spend_Edu.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_spend_Edu.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_spend_Edu.ColumnHeadersHeight = 30;
_spend_Edu.Font = new Font("Microsoft Sans Serif", 12);
_spend_Edu.RowTemplate.Height = 30;
_spend_Edu.AllowUserToAddRows = false;
_spend_Edu.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _spend_Human ----------------------------------
_spend_Human.Size = new Size(600, 392);
_spend_Human.Location = new Point(350, 20);
_spend_Human.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_spend_Human.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_spend_Human.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_spend_Human.ColumnHeadersHeight = 30;
_spend_Human.Font = new Font("Microsoft Sans Serif", 12);
_spend_Human.RowTemplate.Height = 30;
_spend_Human.AllowUserToAddRows = false;
_spend_Human.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _spend_Vol ----------------------------------
_spend_Vol.Size = new Size(600, 392);
_spend_Vol.Location = new Point(350, 20);
_spend_Vol.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_spend_Vol.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_spend_Vol.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_spend_Vol.ColumnHeadersHeight = 30;
_spend_Vol.Font = new Font("Microsoft Sans Serif", 12);
_spend_Vol.RowTemplate.Height = 30;
_spend_Vol.AllowUserToAddRows = false;
_spend_Vol.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _spend_Main ----------------------------------
_spend_Main.Size = new Size(600, 392);
_spend_Main.Location = new Point(350, 20);
_spend_Main.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_spend_Main.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_spend_Main.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_spend_Main.ColumnHeadersHeight = 30;
_spend_Main.Font = new Font("Microsoft Sans Serif", 12);
_spend_Main.RowTemplate.Height = 30;
_spend_Main.AllowUserToAddRows = false;
_spend_Main.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _spend_Loan ----------------------------------
_spend_Loan.Size = new Size(600, 392);
_spend_Loan.Location = new Point(350, 20);
_spend_Loan.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_spend_Loan.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_spend_Loan.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_spend_Loan.ColumnHeadersHeight = 30;
_spend_Loan.Font = new Font("Microsoft Sans Serif", 12);
_spend_Loan.RowTemplate.Height = 30;
_spend_Loan.AllowUserToAddRows = false;
_spend_Loan.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
// _spend_Res ----------------------------------
_spend_Res.Size = new Size(600, 392);
_spend_Res.Location = new Point(350, 20);
_spend_Res.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
_spend_Res.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
_spend_Res.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
_spend_Res.ColumnHeadersHeight = 30;
_spend_Res.Font = new Font("Microsoft Sans Serif", 12);
_spend_Res.RowTemplate.Height = 30;
_spend_Res.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode.DisableResizing;
#endregion
// Draw DGVS --------------------------------------------------
W_SpendTab.Controls.Add(spend);
W_SpendTab.Controls.Add(_spend_Worship);
W_SpendTab.Controls.Add(_spend_Mission);
W_SpendTab.Controls.Add(_spend_Edu);
W_SpendTab.Controls.Add(_spend_Human);
W_SpendTab.Controls.Add(_spend_Vol);
W_SpendTab.Controls.Add(_spend_Main);
W_SpendTab.Controls.Add(_spend_Loan);
W_SpendTab.Controls.Add(_spend_Res);
_spend_Mission.Hide();
_spend_Edu.Hide();
_spend_Human.Hide();
_spend_Vol.Hide();
_spend_Main.Hide();
_spend_Loan.Hide();
_spend_Res.Hide();
W_SpendTab.Controls.Add(spend_total);
W_SpendTab.Controls.Add(_spend_total);
currentTab = _spend_Worship;
}