<div class="gmail_quote">On Wed, Aug 18, 2010 at 2:43 PM, Eric E. Monson <span dir="ltr"><<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hey Marcus,<br>
<br>
I have been trying to develop a vtkContextItem which controls what data is plotted in an XY chart. If I give this control item a pointer to the chart I can change the input data, but if the control item is in a separate vtkContextView in another part of a GUI, I can't figure out if there's a way to force the chart to Paint with a call from this control item (without waiting until the user mouses-over the chart's window)?<br>

<br>
For now I'm getting around it by also handing the control item a pointer to the chart's context view so I can call Render, but it's just one more thing to remember to "wire up" when I'm setting up the control item. So, I was wondering whether there's a way of finding out from the chart either the vtkContext2D to use as an argument in a Paint call or what view the chart is in so I can force a Render?<br>
<br></blockquote><div>Hi Eric,</div><div><br></div><div>You could call render on the vtkContextView. The context item would only know about its own scene, and so you would probably have to store a pointer to the other view. This is possibly a place where adding an event/observer would work well without causing everything to get too tightly coupled.</div>
<div><br></div><div>Marcus </div>--<br clear="all">Marcus D. Hanwell, Ph.D.<br>R&D Engineer, Kitware Inc.<br>(518) 881-4937 </div>