home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / various / ctdemo / ct_tabsp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-02-26  |  15.3 KB  |  482 lines

  1. VERSION 2.00
  2. Begin Form w_tabs_prop 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "ctTABS (Multiple Page Tabs) Demo"
  6.    ClientHeight    =   5220
  7.    ClientLeft      =   900
  8.    ClientTop       =   975
  9.    ClientWidth     =   7710
  10.    Height          =   5745
  11.    Icon            =   CT_TABSP.FRX:0000
  12.    Left            =   840
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MDIChild        =   -1  'True
  16.    ScaleHeight     =   5220
  17.    ScaleWidth      =   7710
  18.    Top             =   510
  19.    Width           =   7830
  20.    Begin ctFRAME ctFrame1 
  21.       BackColor       =   &H00C0C0C0&
  22.       BorderColor     =   &H00000000&
  23.       DistanceApart   =   5
  24.       Height          =   1875
  25.       InnerBorder     =   1  'None
  26.       InnerWidth      =   1
  27.       Left            =   1020
  28.       OuterBorder     =   0  'Regular
  29.       OuterWidth      =   1
  30.       ShadowColor     =   &H00808080&
  31.       ShowBottom      =   -1  'True
  32.       ShowLeft        =   -1  'True
  33.       ShowRight       =   -1  'True
  34.       ShowTop         =   -1  'True
  35.       TabIndex        =   5
  36.       Top             =   1860
  37.       Width           =   5775
  38.       Begin ctTEXT ctText8 
  39.          Alignment       =   1  'Right Justified
  40.          BackColor       =   &H00FFFFFF&
  41.          BorderColor     =   &H00000000&
  42.          BorderType      =   2  'Raised
  43.          ForeColor       =   &H00000000&
  44.          Height          =   315
  45.          Left            =   3960
  46.          PicPosition     =   0  'Center
  47.          ShadowColor     =   &H00000000&
  48.          SingleLine      =   -1  'True
  49.          TabIndex        =   6
  50.          TextAngle       =   0
  51.          TextPosition    =   1  'Center
  52.          ThreeDColor     =   &H00808080&
  53.          ThreeDText      =   0   'False
  54.          Top             =   1260
  55.          Width           =   1455
  56.       End
  57.       Begin ctTEXT ctText7 
  58.          Alignment       =   0  'Left Justified
  59.          BackColor       =   &H00FFFFFF&
  60.          BorderColor     =   &H00000000&
  61.          BorderType      =   2  'Raised
  62.          ForeColor       =   &H00000000&
  63.          Height          =   315
  64.          Left            =   240
  65.          PicPosition     =   0  'Center
  66.          ShadowColor     =   &H00000000&
  67.          SingleLine      =   -1  'True
  68.          TabIndex        =   7
  69.          TextAngle       =   0
  70.          TextPosition    =   1  'Center
  71.          ThreeDColor     =   &H00808080&
  72.          ThreeDText      =   0   'False
  73.          Top             =   1260
  74.          Width           =   3735
  75.       End
  76.       Begin ctTEXT ctText6 
  77.          Alignment       =   1  'Right Justified
  78.          BackColor       =   &H00FFFFFF&
  79.          BorderColor     =   &H00000000&
  80.          BorderType      =   2  'Raised
  81.          ForeColor       =   &H00000000&
  82.          Height          =   315
  83.          Left            =   3960
  84.          PicPosition     =   0  'Center
  85.          ShadowColor     =   &H00000000&
  86.          SingleLine      =   -1  'True
  87.          TabIndex        =   13
  88.          TextAngle       =   0
  89.          TextPosition    =   1  'Center
  90.          ThreeDColor     =   &H00808080&
  91.          ThreeDText      =   0   'False
  92.          Top             =   960
  93.          Width           =   1455
  94.       End
  95.       Begin ctTEXT ctText5 
  96.          Alignment       =   0  'Left Justified
  97.          BackColor       =   &H00FFFFFF&
  98.          BorderColor     =   &H00000000&
  99.          BorderType      =   2  'Raised
  100.          ForeColor       =   &H00000000&
  101.          Height          =   315
  102.          Left            =   240
  103.          PicPosition     =   0  'Center
  104.          ShadowColor     =   &H00000000&
  105.          SingleLine      =   -1  'True
  106.          TabIndex        =   12
  107.          TextAngle       =   0
  108.          TextPosition    =   1  'Center
  109.          ThreeDColor     =   &H00808080&
  110.          ThreeDText      =   0   'False
  111.          Top             =   960
  112.          Width           =   3735
  113.       End
  114.       Begin ctTEXT ctText4 
  115.          Alignment       =   1  'Right Justified
  116.          BackColor       =   &H00FFFFFF&
  117.          BorderColor     =   &H00000000&
  118.          BorderType      =   2  'Raised
  119.          ForeColor       =   &H00000000&
  120.          Height          =   315
  121.          Left            =   3960
  122.          PicPosition     =   0  'Center
  123.          ShadowColor     =   &H00000000&
  124.          SingleLine      =   -1  'True
  125.          TabIndex        =   11
  126.          TextAngle       =   0
  127.          TextPosition    =   1  'Center
  128.          ThreeDColor     =   &H00808080&
  129.          ThreeDText      =   0   'False
  130.          Top             =   660
  131.          Width           =   1455
  132.       End
  133.       Begin ctTEXT ctText3 
  134.          Alignment       =   0  'Left Justified
  135.          BackColor       =   &H00FFFFFF&
  136.          BorderColor     =   &H00000000&
  137.          BorderType      =   2  'Raised
  138.          ForeColor       =   &H00000000&
  139.          Height          =   315
  140.          Left            =   240
  141.          PicPosition     =   0  'Center
  142.          ShadowColor     =   &H00000000&
  143.          SingleLine      =   -1  'True
  144.          TabIndex        =   10
  145.          TextAngle       =   0
  146.          TextPosition    =   1  'Center
  147.          ThreeDColor     =   &H00808080&
  148.          ThreeDText      =   0   'False
  149.          Top             =   660
  150.          Width           =   3735
  151.       End
  152.       Begin ctTEXT ctText2 
  153.          Alignment       =   1  'Right Justified
  154.          BackColor       =   &H00FFFFFF&
  155.          BorderColor     =   &H00000000&
  156.          BorderType      =   2  'Raised
  157.          ForeColor       =   &H00000000&
  158.          Height          =   315
  159.          Left            =   3960
  160.          PicPosition     =   0  'Center
  161.          ShadowColor     =   &H00000000&
  162.          SingleLine      =   -1  'True
  163.          TabIndex        =   9
  164.          TextAngle       =   0
  165.          TextPosition    =   1  'Center
  166.          ThreeDColor     =   &H00808080&
  167.          ThreeDText      =   0   'False
  168.          Top             =   360
  169.          Width           =   1455
  170.       End
  171.       Begin ctTEXT ctText1 
  172.          Alignment       =   0  'Left Justified
  173.          BackColor       =   &H00FFFFFF&
  174.          BorderColor     =   &H00000000&
  175.          BorderType      =   2  'Raised
  176.          ForeColor       =   &H00000000&
  177.          Height          =   315
  178.          Left            =   240
  179.          PicPosition     =   0  'Center
  180.          ShadowColor     =   &H00000000&
  181.          SingleLine      =   -1  'True
  182.          TabIndex        =   8
  183.          TextAngle       =   0
  184.          TextPosition    =   1  'Center
  185.          ThreeDColor     =   &H00808080&
  186.          ThreeDText      =   0   'False
  187.          Top             =   360
  188.          Width           =   3735
  189.       End
  190.    End
  191.    Begin HScrollBar scrBar 
  192.       Height          =   255
  193.       Left            =   4860
  194.       Max             =   11
  195.       Min             =   1
  196.       TabIndex        =   2
  197.       Top             =   4140
  198.       Value           =   1
  199.       Width           =   2175
  200.    End
  201.    Begin CommandButton Command1 
  202.       Caption         =   "E&xit"
  203.       Height          =   375
  204.       Left            =   6510
  205.       TabIndex        =   1
  206.       Top             =   4680
  207.       Width           =   945
  208.    End
  209.    Begin ctTABS ct_tabs 
  210.       Amount          =   11
  211.       BackColor       =   &H00C0C0C0&
  212.       BaseLine        =   -1  'True
  213.       Caption         =   "A-B;C-D;E-F;G-H;I-K;L-M;N-O;P-R;S-T;U-V;W-Z"
  214.       DistanceApart   =   44
  215.       FontBold        =   -1  'True
  216.       FontItalic      =   0   'False
  217.       FontName        =   "Times New Roman"
  218.       FontSize        =   12
  219.       FontStrikethru  =   0   'False
  220.       FontUnderline   =   0   'False
  221.       Height          =   285
  222.       Left            =   840
  223.       Offset          =   0
  224.       SelectedFontBold=   -1  'True
  225.       SelectedFontItalic=   0   'False
  226.       SelectedFontStrikeOut=   0   'False
  227.       SelectedFontUnderline=   0   'False
  228.       SelectedStyle   =   1  'Open
  229.       SelectedTab     =   1
  230.       SelectedTabColor=   &H00C0C0C0&
  231.       SelectedTextColor=   &H00800000&
  232.       TabBackColor    =   &H00E0FFFF&
  233.       TabColor        =   &H00E0FFFF&
  234.       TabIndentation  =   10
  235.       TabStyle        =   0  'Bottom
  236.       TabTextColor    =   &H00000000&
  237.       TabWidth        =   55
  238.       TextColor       =   &H00000000&
  239.       ThreeD          =   -1  'True
  240.       Top             =   4140
  241.       Width           =   4035
  242.    End
  243.    Begin Label Label3 
  244.       Alignment       =   2  'Center
  245.       BackStyle       =   0  'Transparent
  246.       Caption         =   "Click on the tabs or scroll bar to change the directory."
  247.       ForeColor       =   &H00800000&
  248.       Height          =   255
  249.       Left            =   960
  250.       TabIndex        =   14
  251.       Top             =   4680
  252.       Width           =   4935
  253.    End
  254.    Begin Label lbl_cap 
  255.       BackStyle       =   0  'Transparent
  256.       Caption         =   "A-B"
  257.       FontBold        =   0   'False
  258.       FontItalic      =   0   'False
  259.       FontName        =   "Times New Roman"
  260.       FontSize        =   18
  261.       FontStrikethru  =   0   'False
  262.       FontUnderline   =   0   'False
  263.       Height          =   375
  264.       Left            =   6120
  265.       TabIndex        =   4
  266.       Top             =   1260
  267.       Width           =   855
  268.    End
  269.    Begin Label Label2 
  270.       BackColor       =   &H00C0C0C0&
  271.       BackStyle       =   0  'Transparent
  272.       Caption         =   "Telephone Directory"
  273.       FontBold        =   0   'False
  274.       FontItalic      =   0   'False
  275.       FontName        =   "Times New Roman"
  276.       FontSize        =   24
  277.       FontStrikethru  =   0   'False
  278.       FontUnderline   =   0   'False
  279.       ForeColor       =   &H00800000&
  280.       Height          =   615
  281.       Left            =   960
  282.       TabIndex        =   3
  283.       Top             =   1140
  284.       Width           =   4515
  285.    End
  286.    Begin Shape Shape4 
  287.       BackColor       =   &H0000C0C0&
  288.       BackStyle       =   1  'Opaque
  289.       Height          =   135
  290.       Left            =   120
  291.       Top             =   2460
  292.       Width           =   495
  293.    End
  294.    Begin Shape Shape3 
  295.       BackColor       =   &H0000C0C0&
  296.       BackStyle       =   1  'Opaque
  297.       Height          =   135
  298.       Left            =   120
  299.       Top             =   3480
  300.       Width           =   495
  301.    End
  302.    Begin Shape Shape2 
  303.       BackColor       =   &H0000C0C0&
  304.       BackStyle       =   1  'Opaque
  305.       Height          =   135
  306.       Left            =   120
  307.       Top             =   1440
  308.       Width           =   495
  309.    End
  310.    Begin Shape Shape1 
  311.       BorderWidth     =   2
  312.       Height          =   3255
  313.       Left            =   360
  314.       Shape           =   4  'Rounded Rectangle
  315.       Top             =   900
  316.       Width           =   7095
  317.    End
  318.    Begin Label Label1 
  319.       Alignment       =   2  'Center
  320.       BackColor       =   &H00C0C0C0&
  321.       Caption         =   "The ctTABS VBX is a tab control that can be attatched to another object. Its ""Offset"" attribute allows it to contain more tabs than it shows (as displayed below)."
  322.       FontBold        =   -1  'True
  323.       FontItalic      =   0   'False
  324.       FontName        =   "Arial"
  325.       FontSize        =   8.25
  326.       FontStrikethru  =   0   'False
  327.       FontUnderline   =   0   'False
  328.       ForeColor       =   &H00800000&
  329.       Height          =   495
  330.       Left            =   120
  331.       TabIndex        =   0
  332.       Top             =   120
  333.       Width           =   7455
  334.    End
  335. Sub ck_baseline_Click ()
  336. End Sub
  337. Sub ck_bold_Click ()
  338. End Sub
  339. Sub ck_italic_Click ()
  340. End Sub
  341. Sub ck_strike_Click ()
  342. End Sub
  343. Sub ck_threed_Click ()
  344. End Sub
  345. Sub ck_underline_Click ()
  346. End Sub
  347. Sub Command1_Click ()
  348.    Unload w_tabs_prop
  349. End Sub
  350. Sub Command2_Click ()
  351. End Sub
  352. Sub Command3_Click ()
  353. End Sub
  354. Sub Command4_Click ()
  355. End Sub
  356. Sub Command5_Click ()
  357. End Sub
  358. Sub Command6_Click ()
  359. End Sub
  360. Sub ct_tabs_DrawTab (nDrawTab As Integer)
  361.    If (nDrawTab = 5 Or nDrawTab = 11) Then
  362.       ct_Tabs.TabTextColor = RGB(80, 80, 80)
  363.    End If
  364. End Sub
  365. Sub ct_tabs_TabChange (nNewTab As Integer, nOldTab As Integer)
  366. scrBar.Value = nNewTab
  367. ctText1.Caption = ""
  368. ctText2.Caption = ""
  369. ctText3.Caption = ""
  370. ctText4.Caption = ""
  371. ctText5.Caption = ""
  372. ctText6.Caption = ""
  373. ctText7.Caption = ""
  374. ctText8.Caption = ""
  375. Select Case (nNewTab)
  376. Case 1
  377.    lbl_cap.Caption = "A-B"
  378.    ctText1.Caption = "Abott, Bud"
  379.    ctText2.Caption = "840-8338"
  380.    ctText3.Caption = "Aaron, Lee"
  381.    ctText4.Caption = "744-1233"
  382.    ctText5.Caption = "Budinsky, Lou"
  383.    ctText6.Caption = "232-4774"
  384. Case 2
  385.    lbl_cap.Caption = "C-D"
  386.    ctText1.Caption = "Crane, Fraser"
  387.    ctText2.Caption = "477-5855"
  388.    ctText3.Caption = "Dreary, Dave"
  389.    ctText4.Caption = "212-4485"
  390. Case 3
  391.    lbl_cap.Caption = "E-F"
  392.    ctText1.Caption = "Errin, Joe"
  393.    ctText2.Caption = "222-8338"
  394.    ctText3.Caption = "Foley, Axel"
  395.    ctText4.Caption = "923-9233"
  396.    ctText5.Caption = "Frame, P."
  397.    ctText6.Caption = "947-3773"
  398. Case 4
  399.    lbl_cap.Caption = "G-H"
  400.    ctText1.Caption = "Gluck, Craig"
  401.    ctText2.Caption = "475-7903"
  402. Case 5
  403.    lbl_cap.Caption = "I-K"
  404. Case 6
  405.    lbl_cap.Caption = "L-M"
  406.    ctText1.Caption = "Larry, Moe"
  407.    ctText2.Caption = "857-4464"
  408.    ctText3.Caption = "Manny, May"
  409.    ctText4.Caption = "1-844-4833"
  410.    ctText5.Caption = "Moriarty, P."
  411.    ctText6.Caption = "887-8447"
  412. Case 7
  413.    lbl_cap.Caption = "N-O"
  414.    ctText1.Caption = "Neville, Aaron"
  415.    ctText2.Caption = "233-3833"
  416.    ctText3.Caption = "Osterman, al"
  417.    ctText4.Caption = "888-8838"
  418. Case 8
  419.    lbl_cap.Caption = "P-R"
  420.    ctText1.Caption = "Porter, Cole"
  421.    ctText2.Caption = "874-2273"
  422.    ctText3.Caption = "Radison, George"
  423.    ctText4.Caption = "733-4484"
  424.    ctText5.Caption = "Rickson, Bob."
  425.    ctText6.Caption = "393-8338"
  426. Case 9
  427.    lbl_cap.Caption = "S-T"
  428.    ctText1.Caption = "Sargeant, Dick"
  429.    ctText2.Caption = "744-8555"
  430.    ctText3.Caption = "Teller, Pen"
  431.    ctText4.Caption = "885-6955"
  432. Case 10
  433.    lbl_cap.Caption = "U-V"
  434.    ctText1.Caption = "Unger, Felix"
  435.    ctText2.Caption = "274-1273"
  436. Case 11
  437.    lbl_cap.Caption = "W-Z"
  438. End Select
  439. End Sub
  440. Sub ctColor1_OK ()
  441. End Sub
  442. Sub Form_Load ()
  443.    ' Center the window on the screen
  444.    Move (Screen.Width - Width) / 2, (Screen.Height - Height) * .25
  445.    w_mdi_main.bt_tabs = BUTTON_DISABLE
  446.    ctText1.Caption = "Abott, Bud"
  447.    ctText2.Caption = "840-8338"
  448.    ctText3.Caption = "Aaron, Lee"
  449.    ctText4.Caption = "744-1233"
  450.    ctText5.Caption = "Budinsky, Lou"
  451.    ctText6.Caption = "232-4774"
  452. End Sub
  453. Sub Form_Unload (Cancel As Integer)
  454.    w_mdi_main.bt_tabs = BUTTON_UP
  455. End Sub
  456. Sub op_bottom_Click ()
  457. End Sub
  458. Sub op_closed_Click ()
  459. End Sub
  460. Sub op_open_Click ()
  461. End Sub
  462. Sub op_top_Click ()
  463. End Sub
  464. Sub scrBar_Change ()
  465.    Dim Visible As Integer
  466.    Dim Cntr As Integer
  467.    Visible = 6
  468.    If (ct_Tabs.SelectedTab < scrBar.Value) Then
  469.       ct_Tabs.SelectedTab = scrBar.Value
  470.       If (ct_Tabs.SelectedTab - ct_Tabs.Offset > Visible) Then
  471.          ct_Tabs.Offset = ct_Tabs.SelectedTab - Visible
  472.       End If
  473.    Else
  474.       If (ct_Tabs.SelectedTab > scrBar.Value) Then
  475.          ct_Tabs.SelectedTab = scrBar.Value
  476.          If (ct_Tabs.SelectedTab <= ct_Tabs.Offset) Then
  477.             ct_Tabs.Offset = ct_Tabs.SelectedTab - 1
  478.          End If
  479.       End If
  480.    End If
  481. End Sub
  482.