Page 1 of 1

change cursor when zooming

Posted: Thu May 18, 2006 8:01 am
by 9526928
Hi,
I want change cursor's feature and the color of rectangle. How can I do?

Posted: Thu May 18, 2006 8:55 am
by narcis
Hi gong,

I'm not sure of what you exactly want to achieve but you can set TeeChart's zoom pen and brush like this:

Code: Select all

Private Sub Form_Load()
    TChart1.Series(0).FillSampleValues 10
    
    With TChart1.Zoom
        .Pen.Color = vbRed
        .Pen.EndStyle = esRound
        .Brush.Color = vbWhite
        .Brush.Style = bsBDiagonal
    End With    
End Sub
If that's not what you are looking for, please give us more details about your request.

Posted: Fri May 19, 2006 12:49 am
by 9526928
Hi NarcĂ­s,
Thanks, what you write is my want. But I want to know if I can change the cursor like a magnifier feature when zooming the series?

Posted: Sun May 21, 2006 9:48 pm
by Pep
Hi gong,

to accomplish that you will have to make use of the OnMouseDown, OnMouseMove and OnMouseUp events of the Chart component, changing when it's necessary the Cursor, using similar code to the following :
TChart1.Cursor = -21