private void treeList1_CustomNodeCellEdit (object sender, GetCustomNodeCellEditEventArgs e)
{
If (e.c. with our fabrication: olumn FieldName!="name")
{
The object obj=e.N ode. GetValue (0);
If (obj!=null)
{
The switch (e.N ode. GetValue (0). The ToString ())
{
Case "color" :
"E.R epositoryItem=colorEdit;
//"e.R epositoryItem=colorPick;
break;
Case "automatic size" :
"E.R epositoryItem=chkEdit;
break;
}
}
}
}
Color the following colorEdit is already defined
Results after the operation, change the color will be prompted to: can't type into "system. The drawing. The color of object cast to type" system. The string "
I do not know how to solve, where, under the great god, please help the younger brother,
CodePudding user response:
Try "e.R epositoryItem=" colorEdit ";CodePudding user response:
ColorEdit is the control variable names, can't change,CodePudding user response:
ColorEdit is control types, and cannot be direct assignment ofCodePudding user response:
Convert a string to useColorTranslator. ToHtml (... )
Back in
ColorTranslator. FromHtml (... )