Hello David,<br><br>probably the key is to retrieve the properties of the text associated with the slider and modify it (with <span style="font-family: courier new,monospace;">ShadowOff</span>).<br><br>I found this code of mine---perhaps it might help, I'm not sure:<br>
<br><span style="font-family: courier new,monospace;"> void</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> SetSomeTextProperties(</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> vtkTextProperty* a_pTextProperty,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> size_t a_nTextSize,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> double a_d3TextColor[3])</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> if (!a_pTextProperty)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> return;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> a_pTextProperty->SetFontFamilyToArial();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> a_pTextProperty->BoldOff();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> a_pTextProperty->ItalicOff();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <b style="background-color: rgb(255, 255, 153);">a_pTextProperty->ShadowOff();</b></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> a_pTextProperty->SetFontSize(a_nTextSize);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // '- Fails to work (?).</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> // See <a href="http://markmail.org/message/xyx2y7cdwuj3aw55">http://markmail.org/message/xyx2y7cdwuj3aw55</a></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> a_pTextProperty->SetColor(a_d3TextColor);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> a_pTextProperty->SetJustificationToCentered();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> //a_pTextProperty->SetVerticalJustificationToCentered();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br>
<br>Regards,<br><br>Frederic Perez<br><br><div class="gmail_quote">On Thu, Jan 14, 2010 at 3:57 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></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;">To change the font color of a slider, I found to do this:<br>
sliderRep->GetTitleProperty()->SetColor(1,0,0);//red<br>
<br>
However, as this example demonstrates:<br>
<a href="http://www.cmake.org/Wiki/VTK/Examples/Widgets/Cxx/Slider2D" target="_blank">http://www.cmake.org/Wiki/VTK/Examples/Widgets/Cxx/Slider2D</a><br>
<br>
there is a white outline around the red text:<br>
<a href="http://www.rpi.edu/%7Edoriad/VTK_List/slider.jpg" target="_blank">http://www.rpi.edu/~doriad/VTK_List/slider.jpg</a><br>
<br>
Anyone know how to remove the outline and simply make the text red?<br>
<br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">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" target="_blank">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" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>