⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scroll & zoom.frm

📁 Delphi Component - Chart Fx
💻 FRM
字号:
VERSION 5.00
Object = "{8996B0A4-D7BE-101B-8650-00AA003A5593}#4.0#0"; "CFX4032.OCX"
Begin VB.Form Form1 
   Caption         =   "Chart FX. Scroll view & Zoom"
   ClientHeight    =   5955
   ClientLeft      =   2415
   ClientTop       =   1410
   ClientWidth     =   7305
   LinkTopic       =   "Form1"
   ScaleHeight     =   5955
   ScaleWidth      =   7305
   Begin VB.Frame Frame2 
      Caption         =   "Zoom area"
      Height          =   1335
      Left            =   3120
      TabIndex        =   7
      Top             =   4560
      Width           =   4095
      Begin VB.CheckBox Check1 
         Caption         =   "Zoom In"
         Height          =   255
         Left            =   2880
         TabIndex        =   14
         Top             =   360
         Width           =   1095
      End
      Begin VB.TextBox Text6 
         Height          =   285
         Left            =   1680
         TabIndex        =   13
         Text            =   "1800"
         Top             =   840
         Width           =   855
      End
      Begin VB.TextBox Text5 
         Height          =   285
         Left            =   1680
         TabIndex        =   12
         Text            =   "600"
         Top             =   360
         Width           =   855
      End
      Begin VB.TextBox Text4 
         Height          =   315
         Left            =   600
         TabIndex        =   9
         Text            =   "40"
         Top             =   840
         Width           =   855
      End
      Begin VB.TextBox Text3 
         Height          =   285
         Left            =   600
         TabIndex        =   8
         Text            =   "31"
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label4 
         Caption         =   "To:"
         Height          =   255
         Left            =   120
         TabIndex        =   11
         Top             =   840
         Width           =   375
      End
      Begin VB.Label Label3 
         Caption         =   "From:"
         Height          =   255
         Left            =   120
         TabIndex        =   10
         Top             =   360
         Width           =   375
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "X Axis view"
      Height          =   1335
      Left            =   120
      TabIndex        =   1
      Top             =   4560
      Width           =   2775
      Begin VB.CommandButton Command1 
         Caption         =   "&Apply"
         Height          =   375
         Left            =   1680
         TabIndex        =   6
         Top             =   360
         Width           =   975
      End
      Begin VB.TextBox Text2 
         Height          =   285
         Left            =   600
         TabIndex        =   5
         Text            =   "30"
         Top             =   840
         Width           =   855
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Left            =   600
         TabIndex        =   4
         Text            =   "11"
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "To:"
         Height          =   255
         Left            =   120
         TabIndex        =   3
         Top             =   840
         Width           =   495
      End
      Begin VB.Label Label1 
         Caption         =   "From:"
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   360
         Width           =   495
      End
   End
   Begin ChartfxLibCtl.ChartFX ChartFX1 
      Height          =   4335
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7095
      _cx             =   2011042776
      _cy             =   2011042776
      _Version        =   262144
      TypeMask        =   109576193
      MarkerSize      =   2
      BorderColor     =   16777218
      AxesStyle       =   2
      Axis(0).TickMark=   -32767
      Axis(2).TickMark=   -32767
      nColors         =   1
      Colors          =   "scroll & zoom.frx":0000
      nPts            =   50
      nSer            =   1
      NumPoint        =   50
      NumSer          =   1
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Check1_Click()
    If Check1 Then
        ChartFX1.ZoomIn Text3.Text, Text5.Text, Text4.Text, Text6.Text
    Else
        ChartFX1.Zoom = False
    End If
End Sub

Private Sub Command1_Click()
    ChartFX1.Axis(AXIS_X).SetScrollView Text1.Text, Text2.Text
End Sub

Private Sub Command2_Click()
End Sub

Private Sub Form_Load()
    Dim i
    ' Init data
    With ChartFX1
        .Axis(AXIS_Y).Style = .Axis(AXIS_Y).Style And Not AS_SHOWENDS
        .OpenDataEx COD_VALUES, 1, COD_UNCHANGE
        
        For i = 0 To .NValues - 1
            .ValueEx(0, i) = i * i
        Next i
        
        .CloseData COD_VALUES
    End With
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -