<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The other place where I run into trouble with this issue is when I try to change the size/placement of the widget. I make calls like this (sliderRep is an instance of vtkSliderRepresentation2D, python code):<div><br></div><div><div>sliderRep.GetPoint1Coordinate().SetCoordinateSystemToNormalizedDisplay()</div><div>sliderRep.GetPoint1Coordinate().SetValue(0.1 ,0.07)</div><div>sliderRep.GetPoint2Coordinate().SetCoordinateSystemToNormalizedDisplay()</div><div>sliderRep.GetPoint2Coordinate().SetValue(0.9, 0.07)</div><div><br></div><div>but even after trying the naive methods of re-rendering the widget and window:</div><div><br></div><div><div>sliderWidget.Render()</div><div>renderWindow.Render()</div><div><br></div><div>the position of the slider isn't updated until I interact with the window.</div><div><br></div><div>-Eric</div><div><br></div></div><div><div>On May 21, 2010, at 12:41 PM, imran khan wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Karthik:<br><br>The issue is that the widget maintains its absolute size when the window is resized. It sizes up correctly when<br>a mouse interaction happens within the rendered area. So what my hack is doing is mimicking a middle button<br>
press which indirectly resizes the widgets correctly.<br><br>It is not clear what changing the Point1Coordinate and a Point2Coordinate in normalized coordinates would do. As<br>I want to maintain the same normalized locations when the window resizes.<br>
<br>Imran<br><br><div class="gmail_quote">On Fri, May 21, 2010 at 12:08 PM, Karthik Krishnan <span dir="ltr">&lt;<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm not sure what that code snippet does, but this is totally not the right way to resize any widget. <br><br>The slider representation has a Point1Coordinate and a Point2Coordinate. These define the end points of the slider (in normlized coordinates [-1, 1]). These iVars just aren't exposed. Modify the code yourself (or derive from vtkSliderRepresentation2D) and expose them so as to resize the widget.<br>

<br>Thanks<br>--<br><font color="#888888">karthik</font><div><div></div><div class="h5"><br><br><br><br></div></div></blockquote></div>
</blockquote></div><br></div></body></html>