DataGridView.AdjustColumnHeaderBorderStyle Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Şu anda boyanmakta DataGridViewAdvancedBorderStyle olan sütun DataGridView başlığı hücresinin değerini ayarlar.
public:
virtual System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ AdjustColumnHeaderBorderStyle(System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ dataGridViewAdvancedBorderStyleInput, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ dataGridViewAdvancedBorderStylePlaceholder, bool isFirstDisplayedColumn, bool isLastVisibleColumn);
public virtual System.Windows.Forms.DataGridViewAdvancedBorderStyle AdjustColumnHeaderBorderStyle (System.Windows.Forms.DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput, System.Windows.Forms.DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceholder, bool isFirstDisplayedColumn, bool isLastVisibleColumn);
abstract member AdjustColumnHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * bool * bool -> System.Windows.Forms.DataGridViewAdvancedBorderStyle
override this.AdjustColumnHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * bool * bool -> System.Windows.Forms.DataGridViewAdvancedBorderStyle
Public Overridable Function AdjustColumnHeaderBorderStyle (dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, dataGridViewAdvancedBorderStylePlaceholder As DataGridViewAdvancedBorderStyle, isFirstDisplayedColumn As Boolean, isLastVisibleColumn As Boolean) As DataGridViewAdvancedBorderStyle
Parametreler
- dataGridViewAdvancedBorderStyleInput
- DataGridViewAdvancedBorderStyle
DataGridViewAdvancedBorderStyle Değiştirileceği sütun başlığı kenarlık stilini temsil eden bir.
- dataGridViewAdvancedBorderStylePlaceholder
- DataGridViewAdvancedBorderStyle
DataGridViewAdvancedBorderStyle Sütun başlığı kenarlık stilinde ara değişiklikleri depolamak için kullanılan bir.
- isFirstDisplayedColumn
- Boolean
true
şu anda boyanmakta DataGridViewCell olan öğesinin üzerinde görüntülenen DataGridViewilk sütunda olduğunu belirtmek için; aksi takdirde . false
- isLastVisibleColumn
- Boolean
true
şu anda boyanmakta DataGridViewCell olan öğesinin, özelliğinin olarak ayarlandığı son sütunda DataGridView olduğunu Visible belirtmek için true
; değilse , false
.
Döndürülenler
DataGridViewAdvancedBorderStyle Geçerli sütun başlığı için kenarlık stilini temsil eden bir.
Örnekler
Aşağıdaki kod örneği, sütun başlığı hücrelerinin AdjustColumnHeaderBorderStyle kenarlıklarını özelleştirmek için yönteminin nasıl geçersiz kılınduğunu gösterir. Bu kod örneği, sınıfı için DataGridViewAdvancedBorderStyle sağlanan daha büyük bir örneğin parçasıdır.
public override DataGridViewAdvancedBorderStyle AdjustColumnHeaderBorderStyle(
DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput,
DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceHolder,
bool firstDisplayedColumn,
bool lastVisibleColumn)
{
// Customize the left border of the first column header and the
// bottom border of all the column headers. Use the input style for
// all other borders.
dataGridViewAdvancedBorderStylePlaceHolder.Left = firstDisplayedColumn ?
DataGridViewAdvancedCellBorderStyle.OutsetDouble :
DataGridViewAdvancedCellBorderStyle.None;
dataGridViewAdvancedBorderStylePlaceHolder.Bottom =
DataGridViewAdvancedCellBorderStyle.Single;
dataGridViewAdvancedBorderStylePlaceHolder.Right =
dataGridViewAdvancedBorderStyleInput.Right;
dataGridViewAdvancedBorderStylePlaceHolder.Top =
dataGridViewAdvancedBorderStyleInput.Top;
return dataGridViewAdvancedBorderStylePlaceHolder;
}
Public Overrides Function AdjustColumnHeaderBorderStyle( _
ByVal dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, _
ByVal dataGridViewAdvancedBorderStylePlaceHolder As DataGridViewAdvancedBorderStyle, _
ByVal firstDisplayedColumn As Boolean, ByVal lastVisibleColumn As Boolean) _
As DataGridViewAdvancedBorderStyle
' Customize the left border of the first column header and the
' bottom border of all the column headers. Use the input style for
' all other borders.
If firstDisplayedColumn Then
dataGridViewAdvancedBorderStylePlaceHolder.Left = _
DataGridViewAdvancedCellBorderStyle.OutsetDouble
Else
dataGridViewAdvancedBorderStylePlaceHolder.Left = _
DataGridViewAdvancedCellBorderStyle.None
End If
With dataGridViewAdvancedBorderStylePlaceHolder
.Bottom = DataGridViewAdvancedCellBorderStyle.Single
.Right = dataGridViewAdvancedBorderStyleInput.Right
.Top = dataGridViewAdvancedBorderStyleInput.Top
End With
Return dataGridViewAdvancedBorderStylePlaceHolder
End Function
End Class
Açıklamalar
Denetim, DataGridView sütun başlığı hücrelerinin AdjustColumnHeaderBorderStyle kenarlıklarının görünümünü belirlemek için yöntemini dahili olarak çağırır. Denetim DataGridView genellikle parametresi için özelliğinin AdvancedColumnHeadersBorderStyledataGridViewAdvancedBorderStyleInput
değerini kullanır.
Devralanlara Notlar
Sütun başlığı hücrelerinde kenarlık görünümünü özelleştirmek istiyorsanız bu yöntemi geçersiz kılın.
Şunlara uygulanır
Ayrıca bkz.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin