[vtkusers] Resizing vtkSliderRepresentation2D

imran khan khan.imranh at gmail.com
Fri May 21 12:41:41 EDT 2010


Karthik:

The issue is that the widget maintains its absolute size when the window is
resized. It sizes up correctly when
a mouse interaction happens within the rendered area. So what my hack is
doing is mimicking a middle button
press which indirectly resizes the widgets correctly.

It is not clear what changing the Point1Coordinate and a Point2Coordinate in
normalized coordinates would do. As
I want to maintain the same normalized locations when the window resizes.

Imran

On Fri, May 21, 2010 at 12:08 PM, Karthik Krishnan <
karthik.krishnan at kitware.com> wrote:

> I'm not sure what that code snippet does, but this is totally not the right
> way to resize any widget.
>
> The slider representation has a Point1Coordinate and a Point2Coordinate.
> These define the end points of the slider (in normlized coordinates [-1,
> 1]). These iVars just aren't exposed. Modify the code yourself (or derive
> from vtkSliderRepresentation2D) and expose them so as to resize the widget.
>
> Thanks
> --
> karthik
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100521/bf05fdb0/attachment.htm>


More information about the vtkusers mailing list