DataGridView DefaultCellStyle 的 C++ /CLI 填充
C++ /CLI padding of DataGridView DefaultCellStyle
我想在 CellMouseEnter
活动中更改我的 cellpadding
。
我认为这会非常简单。
System::Void dgv_CellMouseEnter(System::Object^ sender,
System::Windows::Forms::DataGridViewCellEventArgs^ e) {
dgv->Rows[e->RowIndex]->DefaultCellStyle->Padding =gcnew
System::Windows::Forms::Padding(5);
}
但是我得到一个错误
funktion "System::Windows::Forms::DataGridViewCellStyle::Padding::set" cannot
be called with the given argument list. Argument types are:
(System::Windows::Forms::Padding ^)
object type is :System::Windows::Forms::DataGridViewCellStyle^
Padding 属性(set) 不接受指针类型
尝试删除 gcnew
(有效)。
dgv->Rows[e->RowIndex]->DefaultCellStyle->Padding = System::Windows::Forms::Padding(5);
我想在 CellMouseEnter
活动中更改我的 cellpadding
。
我认为这会非常简单。
System::Void dgv_CellMouseEnter(System::Object^ sender,
System::Windows::Forms::DataGridViewCellEventArgs^ e) {
dgv->Rows[e->RowIndex]->DefaultCellStyle->Padding =gcnew
System::Windows::Forms::Padding(5);
}
但是我得到一个错误
funktion "System::Windows::Forms::DataGridViewCellStyle::Padding::set" cannot
be called with the given argument list. Argument types are:
(System::Windows::Forms::Padding ^)
object type is :System::Windows::Forms::DataGridViewCellStyle^
Padding 属性(set) 不接受指针类型
尝试删除 gcnew
(有效)。
dgv->Rows[e->RowIndex]->DefaultCellStyle->Padding = System::Windows::Forms::Padding(5);