[vtkusers] Modify the format of text shown in distanceWidget

Jothybasu K Selvaraj jothybasu at gmail.com
Mon Apr 19 04:48:08 EDT 2010


Instead, I modified the existing example,

*
http://www.vtk.org/Wiki/VTK/Examples/Widgets/vtkDistanceWidget#DistanceWidget.cxx

*Jothy*
*
On Mon, Apr 19, 2010 at 9:45 AM, Jothybasu K Selvaraj
<jothybasu at gmail.com>wrote:

> Thanks Mirko,
>
> It worked, I will add an example to wiki.
>
> Jothy
>
>
> On Mon, Apr 19, 2010 at 7:36 AM, mirko heuegger <mheuegger at gmail.com>wrote:
>
>> Hello!
>>
>> On Fri, Apr 16, 2010 at 6:02 PM, Jothybasu K Selvaraj
>> <jothybasu at gmail.com> wrote:
>> > How can I modify the distance shown in the vtkDistanceWidget?
>> > It shows only the numerical value,say 58,but I want it to be as 58 mm.
>>
>> That should by possible by setting a proper label-format to the
>> vtkDistanceRepresentation from
>> you DistanceWidget:
>> e.g:
>> vtkDistanceRepresentation . SetLabelFormat("%-#6.3g mm"):
>>
>>
>> hth
>>
>> mirko
>>
>> --
>> Real programmers don't document; if it was
>> hard to write, it should be hard to understand.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100419/e0081747/attachment.htm>


More information about the vtkusers mailing list