Magnifying Glass icon for zooming in?

TeeChart for ActiveX, COM and ASP
Post Reply
PhilOutram
Newbie
Newbie
Posts: 17
Joined: Mon Jun 19, 2006 12:00 am
Location: Auckland

Magnifying Glass icon for zooming in?

Post by PhilOutram » Tue Jul 22, 2008 8:39 pm

Hi,

It's useful to be able to use the arrow cursors to show the user he's panning in certain directions (e.g. left and right joined arrow cursor for horizontal panning). For consistency, I'd like to show a 'Zoom in magnifying glass' cursor when the user is dragging down and right, and a 'Zoom out magnifying glass' cursor when the user is dragging up and left.

As far as I can tell, there is no + or - magnifying cursor?

Is it possible to create a custom cursor?

If so, is there some easy code to tell (I'm assuming it'd be OnMouseMove) whether the user is currently zooming in or out?

Many thanks for any help anyone can give.

Cheers,
Phil.

Yeray
Site Admin
Site Admin
Posts: 9601
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Jul 23, 2008 8:08 am

Hi Phil,

We are not sure to understand what are you exactly trying to do here. Please, take a look at the Tutorial 11 - Zoom and Scroll and at the demo What's New/New Chart Tools/Magnify.

If you still have problems with it, please, feel free to explain it.

You will find both tutorials and demos at TeeChart's program group.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

PhilOutram
Newbie
Newbie
Posts: 17
Joined: Mon Jun 19, 2006 12:00 am
Location: Auckland

Post by PhilOutram » Thu Jul 24, 2008 8:28 am

Hi,

Thanks for the response. I obviously didn't explain myself brilliantly.

What I'd like to do is set the cursor to a magnifying glass when the user has the left mouse button down and is in the process of selecting a zoom rectangle.

I'm doing something similar for the panning - i.e. when the user holds down the right mouse button, the cursor is set to arrows...

Private Sub TChart1_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
If Button = mbRight Then
' ScrollDirection is one of 0 = pmNone, pmHorizontal, pmVertical, 3 = pmBoth
If ScrollDirection = pmHorizontal Then
TChart1.Cursor = -9 ' crSizeWE
ElseIf ScrollDirection = pmVertical Then
TChart1.Cursor = -7 ' crSizeNS
ElseIf ScrollDirection = pmBoth Then
TChart1.Cursor = -5 ' crSize
End If
End If
End Sub

So what I'd like to know is, is there a TChart1.Cursor = ? setting that is a magnifying glass cursor? If not, is it possible to create a new cursor using a bmp or other drawing object?

I hope this is explained better.

Many thanks,
Phil.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 24, 2008 9:18 am

Hi Phil,

Thanks for the information.

I'm afraid there's no such a cursor style. However, you could try using Screen.MouseIcon and Screen.MousePointer properties and assign its cursor to TeeChart.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

PhilOutram
Newbie
Newbie
Posts: 17
Joined: Mon Jun 19, 2006 12:00 am
Location: Auckland

Post by PhilOutram » Thu Jul 24, 2008 9:47 am

Ah, that sounds like what I need to do. However, I'm not familiar with the Screen object. Can you point me in the direction of more help on this? Or how I'd set the TeeChart cursor to one these Screen objects?

Many thanks,
Phil.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 24, 2008 9:54 am

Hi Phil,

Screen object is a VB6 object, not a TeeChart object and there's an example of it in VB6's help files. Anyway you can do something like this:

Code: Select all

    Screen.MouseIcon = LoadPicture("C:\temp\teechart8.ico")
    Screen.MousePointer = 99
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply