<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello<br>
<br>
I started as described in the "The Paraview Guide" book chapter 18.2 to
have a button,<br>
where something happens if pressed.<br>
In this case a vtkSphere will be added to the RenderWindow.<br>
<br>
The code example:<br>
<br>
void vtkPVRenderView::PrintColor()<br>
{<br>
this->PrintColorButton->SetLabel("it
works");<br>
vtkRenderWindow *renWindow =
this->GetRenderWindow();<br>
vtkRenderer *ren =
renWindow->GetRenderers()->GetFirstRenderer();<br>
renWindow->AddRenderer(ren);<br>
double array[3];<br>
array[0] = 3.0;<br>
array[1] = 2.0;<br>
array[2] = 4.0;<br>
vtkSphereSource *vtksphere = vtkSphereSource::New();<br>
vtksphere->SetCenter(array);<br>
vtksphere->SetRadius(sphere->getRadius() );<br>
vtkPolyDataMapper *sphereMapper =
vtkPolyDataMapper::New();<br>
sphereMapper->SetInput(vtksphere->GetOutput());<br>
vtkActor *sphereActor = vtkActor::New();<br>
sphereActor->SetMapper(sphereMapper);<br>
ren->AddActor(sphereActor);<br>
renWindow->Render();<br>
<br>
<b>
((vtkPVWindow*)this->ParentWindow)->GetMainView()->GetSplitFrame()->UnpackSiblings();<br>
((vtkPVWindow*)this->ParentWindow)->Script("pack
%s -side top -fill both -expand t",<br>
((vtkPVWindow*)this->ParentWindow)->GetMainView()->GetSplitFrame()->GetWidgetName());<br>
if
(!((vtkPVWindow*)this->ParentWindow)->GetCurrentPVSource())
{ return; }<br>
((vtkPVWindow*)this->ParentWindow)->GetCurrentPVSource()->Pack();</b>
<br>
}<br>
<br>
ok so far it works - I can press the button and see in the RenderWindow
the Sphere ;-)<br>
The last bold lines - switch the view to the
"Selection Window".<br>
How can I bring now the Sphere in this PrintColor() function to this
"SelectionWindow" as when I press<br>
in the "Source" menu the Sphere item?<br>
There are any code examples available ?<br>
<br>
Best regards <br>
Sebastian<br>
<br>
<br>
</body>
</html>