Profile Picture

Change custom NCompositeShape color/shape at runtime from code.

Posted By Mohamed Salti 11 Years Ago

Change custom NCompositeShape color/shape at runtime from code.

Author
Message
Mohamed Salti
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 4, Visits: 1
Hi,

I have a simple NCompositeShape tied to some custom objects. Depending on property values in the underlying custom object I would like the shape or color of the existing shape to change on the drawing document.

Right now I have the following code:

//On the Custom Shape
CustomObject _obj = someCustomObj;

if (_obj.MyType == "sometype")
NStyle.SetFillStyle(this, new NColorFillStyle(GetTypeColor(_obj.MyType)));


The problem is that the color doesn't change on the drawing document. I attempted SmartRefreshAllViews() on the drawing document, but that doesn't seem to update the shape's colour. NStyle.SetFillStyle does seem to be changing the shape's colour, but it doesn't reflect in the drawing document.

Any help would be appreciated.

Thanks!




Similar Topics


Reading This Topic