<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hey Rakesh,<div><br></div><div>Here's an example (Python) of how I set up the vtkScalarBarWidget. I did the sizing by setting the "position coordinates" (relative to window size) on the representation:</div><div><br></div><div>vertexScalarBar = vtk.vtkScalarBarWidget()<br>vertexScalarBar.SetInteractor(iren)<br>vertexScalarBar.SetDefaultRenderer(view.GetRenderer())<br>vertexScalarBar.SetCurrentRenderer(view.GetRenderer())<br>vertexScalarBar.SetEnabled(True)<br>sbActor = vertexScalarBar.GetScalarBarActor()<br>sbActor.SetLookupTable(vertMapper.GetLookupTable())<br>sbActor.SetTitle(vertMapper.GetArrayName())<br>sbActor.SetNumberOfLabels(3)<br>scalarBarRep = vertexScalarBar.GetRepresentation()<br>scalarBarRep.SetOrientation(1) # 0 = Horizontal, 1 = Vertical<br>scalarBarRep.GetPositionCoordinate().SetValue(0.05,0.05)<br>scalarBarRep.GetPosition2Coordinate().SetValue(0.15,0.25)<br><br></div><div>-Eric</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>------------------------------------------------------</div><div>Eric E Monson</div><div>Duke Visualization Technology Group</div><div><br class="webkit-block-placeholder"></div></span></div><br><div><div>On Sep 15, 2010, at 1:20 PM, Rakesh Patil wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello,<br><br>How can i set the height and width of the scalar bar actor in vtkScalarBarWidget??<br><br>I tried using scalarWidget->GetScalarBarActor()->SetHeight(0.85);<br><br>but i can't see any effect by doing so...<br><br>Is there any other way to set a particular height and width?<br><br>Thanks<br><br>Regards<br>Rakesh Patil<br><br><br><div style="border-top:1px dashed #ccc; border-bottom:1px dashed #ccc; padding:5px;"><a href="http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing" style="font:13px arial; color:#1E56A1; text-decoration:none;">Dear <b>VTK Mailing List !</b> Get Yourself a cool, short <b>@in.com</b> Email ID now!</a></div><div style="border-bottom:1px dashed #ccc; padding:5px;"><a href="http://www.in.com/report_spam.php?i=72616b65736874687040696e2e636f6d7c7c61346133666534376533616431633635626134353264653263613132356266323062346135386566" style="font:10px arial; color:#1E56A1; text-decoration:none;">Report spam</a></div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br></div></body></html>