<br><div class="gmail_quote">Hi,<br><br>I created a vtkLegendBoxActor and I added it to my custom view.<br><br>actor looks fine and working fine, but I am unable to drag it with the mouse. I want to make it dragable.<br><br>
I tried this-&gt;LegendBoxActor-&gt;SetDragable(1); but this did not work for me.<br><br>I want this vtkLegendBoxActor behave like a ChartLegend in XYChartView, it should be dragable.<br>
<br>Please suggest your views.<br><br>Appreciate your help in this regard.<br><br>Here is my code <br clear="all"><br>this-&gt;LegendBoxActor = vtkLegendBoxActor::New();<br>    this-&gt;LegendBoxActor-&gt;SetNumberOfEntries(5);<br>

    this-&gt;LegendBoxActor-&gt;SetUseBackground(1);<br>    this-&gt;LegendBoxActor-&gt;SetBackgroundColor(backgroundColor);<br>    this-&gt;LegendBoxActor-&gt;SetBackgroundOpacity(1.0);<br><br><br>    this-&gt;LegendBoxActor-&gt;GetPositionCoordinate()-&gt;SetCoordinateSystemToView();<br>

    this-&gt;LegendBoxActor-&gt;GetPositionCoordinate()-&gt;SetValue(-0.1, -0.2);<br><br>    this-&gt;LegendBoxActor-&gt;GetPosition2Coordinate()-&gt;SetCoordinateSystemToView();<br>    this-&gt;LegendBoxActor-&gt;GetPosition2Coordinate()-&gt;SetValue(0.1, 0.2);<br>

<br>for(int i=0; i &lt; 5; ++i)<br>      {<br>      vtkSmartPointer&lt;vtkLineSource&gt; ls (vtkSmartPointer&lt;vtkLineSource&gt;::New());<br>      vtkSmartPointer&lt;vtkPolyData&gt; pd = ls-&gt;GetOutput();<br>      this-&gt;LegendBoxActor-&gt;SetEntry(i, pd, text[i], textColor[i]);<br>

      }<br><br>this-&gt;LegendBoxActor-&gt;SetPickable(1);<br>this-&gt;LegendBoxActor-&gt;SetDragable(1);<br><br>this-&gt;GetNonCompositedRenderer()-&gt;AddActor(this-&gt;LegendBoxActor); // here i added this actor to my view.<span class="HOEnZb"><font color="#888888"><br>
<br>-- <br>Thanks,<br>Hanumanth.<br><br>
</font></span></div><br>