Page 1 of 1

aspect.elevation/aspect.rotation ignored until tcRotate used

Posted: Thu Apr 03, 2008 5:24 pm
by 6928489
Hi:

I have sliders on my form to control elevation and rotation. They worked fine in version 5. But in version 8, they have no effect until the user drags the image and rotates it (3d) using the tcRotate tool. Then they start working -- although they are not "synced" the current position of the image.

Any ideas what might be the problem?

Thanks,

Matt

Posted: Fri Apr 04, 2008 10:15 am
by yeray
Hi Matt,

Could you try the following code? It works fine here in a new project with only a chart and two sliders.

Code: Select all

Private Sub Form_Load()
  Slider1.Min = 0
  Slider2.Min = 0
  
  Slider1.Max = 360
  Slider2.Max = 360
  
  Slider1.Value = TChart1.Aspect.Elevation
  Slider2.Value = TChart1.Aspect.Rotation
  
  TChart1.Aspect.Orthogonal = False
End Sub

Private Sub Slider1_Change()
  TChart1.Aspect.Elevation = Slider1.Value
End Sub

Private Sub Slider1_Scroll()
  Slider1_Change
End Sub

Private Sub Slider2_Change()
  TChart1.Aspect.Rotation = Slider2.Value
End Sub

Private Sub Slider2_Scroll()
  Slider2_Change
End Sub

Posted: Fri Apr 04, 2008 11:39 am
by 6928489
Hi:

It was the:

TChart1.Aspect.Orthogonal = False

Now it works.

Thanks!