How do you change the text of Rhino Annotation Text?

This might be a simple question but I was trying to modify this example : http://wiki.mcneel.com/developer/sdksamples/addtext
to have a different font color.

I see you have to try to do this via the attributes but when I go to add something like this

CRhinoObjectAttributes colorAttribute =text_object->Attributes();
colorAttribute.m_color = ON_Color(255, 0, 0);
text_object->ObjectDrawColor(colorAttribute, true);

It seem to still stay black…

I’m sure I am missing something simple here…

Try this:

CRhinoObjectAttributes attributes = object->Attributes();
attributes.m_color = ON_Color(255, 0, 0);
attributes.SetColorSource(ON::color_from_object);
context.m_doc.ModifyObjectAttributes(CRhinoObjRef(object), attributes);
context.m_doc.Redraw();

Thanks Dale