[Closed] dotnet datagridviewcellstyle weirdness
This is really messing with my head.
I’m trying to independently set two cellstyles, but even though I am defining two independent dotnet objects, when I change one, the other changes…
Have I discovered quantum entanglement within maxscript?
Run the following, the result is strange, changing ‘a’ backcolor, changes ‘b’ backcolor. But if I redefined ‘b’, then change ‘a’, the link appears broken, and I can change the colours without affecting the other.
What on earth am I doing wrong here?
a = dotnetobject “DataGridViewCellStyle”
b = dotnetobject “DataGridViewCellStyle”
a.tostring()
b.tostring()
a.backcolor = a.backcolor.black
a.tostring()
b.tostring()
b = dotnetobject “DataGridViewCellStyle”
a.backcolor = a.backcolor.white
a.tostring()
b.tostring()