THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/12/2008 at 16:26, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform:
Language(s) : C++ ;
---------
Hi!
I have a problem with the SplineCustomGui gadget. Does anyone of you know what I've forgot? I want to insert a knot.
When I insert the knot by code after the gadget was created - everything is all right.
If I insert the knot later, e.g. with a button, the knot is not visible until I click with the right mouse button in the gadget area.
Is there another "update" method which I forgot to sent?
Does work:
> <code>
> class test : public GeDialog {
> private:
> SplineCustomGui *spline_gadget;
>
> public:
> Bool CreateLayout(void)
> {
> spline_gadget = (SplineCustomGui* )AddCustomGui(1001, CUSTOMGUI_SPLINE, "ok", 0, 100, 100, BaseContainer());
> spline_gadget->GetSplineData()->InsertKnot(0, 0, 0);
> spline_gadget->Redraw();
>
> AddButton(1002, 0, 150, 15, "click");
> }
>
> </code>
Does not work:
> <code>
> class test : public GeDialog {
> private:
> SplineCustomGui *spline_gadget;
>
> public:
> Bool CreateLayout(void)
> {
> spline_gadget = (SplineCustomGui* )AddCustomGui(1001, CUSTOMGUI_SPLINE, "ok", 0, 100, 100, BaseContainer());
> AddButton(1002, 0, 150, 15, "click");
> }
> Bool Command(LONG id, const BaseContainer& msg)
> {
> if(id==1002)
> {
> /* no method of SplineCustomGui works. I have to use the right mouse click to update the gadget */
> spline_gadget->GetSplineData()->InsertKnot(0, 0, 0);
> spline_gadget->Redraw();
> }
> return TRUE;
> }
> }
> </code>
Thanks a lot. :)