# From vtkDistanceRepresentation2D to vtkDistanceWidget

**URL:** https://discourse.vtk.org/t/from-vtkdistancerepresentation2d-to-vtkdistancewidget/2646
**Category:** Support
**Created:** [February 18, 2020, 10:18am UTC](https://discourse.vtk.org/t/from-vtkdistancerepresentation2d-to-vtkdistancewidget/2646 "2020-02-18T10:18:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [February 18, 2020, 10:18am UTC](https://discourse.vtk.org/t/from-vtkdistancerepresentation2d-to-vtkdistancewidget/2646/1 "2020-02-18T10:18:02Z")

</div>

If I got a pointer to vtkDistanceRepresentation2D (through a picker), how can I get a pointer to my vtkDistanceWidget which contain this vtkDistanceRepresentation2D ?

---

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [February 19, 2020, 10:17am UTC](https://discourse.vtk.org/t/from-vtkdistancerepresentation2d-to-vtkdistancewidget/2646/2 "2020-02-19T10:17:18Z")

</div>

I mean, if I find a pointer to vtkDistanceRepresentation2D (vtkProp), how can I find its associated parent widget (vtkDistanceWidget) ? I have read their source code, but vtkDistanceRepresentation2D (and its parents) have no pointer to its widget … or, I didn’t saw it …
