<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Try the BorderWidget example in the vtkwikiexamples. You can download</div>
that directly from the wiki<br>
<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/BorderWidget" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/BorderWidget</a><br>
<br>
or get it from the git server<br>
<br>
<a href="http://gitorious.org/vtkwikiexamples" target="_blank">http://gitorious.org/vtkwikiexamples</a><br>
<br>
It looks to me the drag and resize are implemented. You just need the<br>
ability to have the user set the initial size. In the case of the<br>
example the Widget is already some default size on the screen and not<br>
added by a user action.<br></blockquote><div><br></div><div>John,</div><div><br>Did you mean to post the non-Qt version?</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Border">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Border</a></div>
<div class="gmail_quote"><br></div><div class="gmail_quote"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Border"></a>Also, in both of them, the widget is not subclassed. vtkCommand is subclassed and an observer is added to the widget. I just modified <meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Border">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/Border</a> so that is an actual subclass of the widget. There is a lot of funny business that has to go on (the function must be static, you must set a this->CallbackMapper method, etc) but this is probably the way you want to go to have the most control.</div>
<div class="gmail_quote"><br>David</div>