home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Samples / 3CTRLS / 3CTRLS.ZIP / INDEXTAB.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-10-05  |  11.5 KB  |  297 lines

  1. VERSION 2.00
  2. Begin Form IndexTab 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Resize the form and see the size of the tabs"
  5.    Height          =   6015
  6.    Left            =   705
  7.    LinkTopic       =   "Form2"
  8.    ScaleHeight     =   5550
  9.    ScaleWidth      =   6195
  10.    Top             =   600
  11.    Width           =   6375
  12.    Begin VideoSoftElastic VSElastic1 
  13.       Align           =   5  'Fill Container
  14.       AutoSizeChildren=   1  'Even Horizontal
  15.       BackColor       =   &H00C0C0C0&
  16.       BevelOuter      =   1  'Raised
  17.       BevelOuterWidth =   1
  18.       Height          =   4995
  19.       Left            =   0
  20.       MinChildSize    =   3500
  21.       TabIndex        =   0
  22.       Top             =   0
  23.       Width           =   6195
  24.       Begin VideoSoftIndexTab VSIndexTab1 
  25.          BackTabColor    =   &H00008080&
  26.          Caption         =   "Info|To do|Tasks"
  27.          FontBold        =   -1  'True
  28.          FontItalic      =   0   'False
  29.          FontName        =   "Arial"
  30.          FontSize        =   13.5
  31.          FontStrikethru  =   0   'False
  32.          FontUnderline   =   0   'False
  33.          FrontTabColor   =   &H00C0C0C0&
  34.          Height          =   4815
  35.          Index           =   0
  36.          Left            =   90
  37.          Position        =   0  'Top
  38.          ShowFocusRect   =   0   'False
  39.          Style           =   4  'Chamfered
  40.          TabIndex        =   1
  41.          TabOutlineColor =   &H00FFFFFF&
  42.          TabsPerPage     =   3
  43.          Top             =   90
  44.          Width           =   6015
  45.          Begin VideoSoftElastic VSElastic5 
  46.             BackColor       =   &H00C0C0C0&
  47.             BevelOuter      =   0  'None
  48.             BevelOuterWidth =   1
  49.             Caption         =   "The first container to the left is assigned to the first tab, the second one to the left is assigned to the second tab, and so on.  Move the containers to the left or rigth inside the IndexTab to change tab assignments."
  50.             CaptionPos      =   4  'Center Center
  51.             Height          =   3330
  52.             Left            =   4170
  53.             TabIndex        =   17
  54.             Top             =   600
  55.             Width           =   1815
  56.          End
  57.          Begin VideoSoftElastic VSElastic4 
  58.             AutoSizeChildren=   3  'Even Vertical
  59.             BackColor       =   &H00C0C0C0&
  60.             BevelOuter      =   0  'None
  61.             CaptionPos      =   6  'Right Top
  62.             Height          =   1395
  63.             Left            =   2550
  64.             TabIndex        =   14
  65.             TagWidth        =   650
  66.             Top             =   600
  67.             Width           =   1470
  68.             Begin ListBox List1 
  69.                BackColor       =   &H0080FFFF&
  70.                Height          =   420
  71.                Index           =   1
  72.                Left            =   735
  73.                TabIndex        =   16
  74.                Tag             =   "Notes"
  75.                Top             =   750
  76.                Width           =   645
  77.             End
  78.             Begin ListBox List1 
  79.                Height          =   420
  80.                Index           =   0
  81.                Left            =   735
  82.                TabIndex        =   15
  83.                Tag             =   "To Do"
  84.                Top             =   90
  85.                Width           =   645
  86.             End
  87.          End
  88.          Begin VideoSoftElastic VSElastic2 
  89.             AutoSizeChildren=   4  'Uneven Vertical
  90.             BackColor       =   &H00C0C0C0&
  91.             BevelOuter      =   0  'None
  92.             CaptionPos      =   6  'Right Top
  93.             Height          =   2670
  94.             Left            =   90
  95.             TabIndex        =   2
  96.             Top             =   495
  97.             Width           =   2445
  98.             Begin TextBox Text3 
  99.                BackColor       =   &H00FFFFFF&
  100.                ForeColor       =   &H00000000&
  101.                Height          =   765
  102.                Left            =   90
  103.                MultiLine       =   -1  'True
  104.                ScrollBars      =   2  'Vertical
  105.                TabIndex        =   18
  106.                Tag             =   "Notes"
  107.                Text            =   "If the Elastic TagWidth property is set to a value greater than 0, the Elastic displays each child's Tag property content as a label.  Check the Tag property of the controls in this elastic."
  108.                Top             =   1815
  109.                Width           =   2265
  110.             End
  111.             Begin VideoSoftElastic VSElastic3 
  112.                AutoSizeChildren=   3  'Even Vertical
  113.                BackColor       =   &H00C0C0C0&
  114.                ForeColor       =   &H00FF0000&
  115.                Height          =   1635
  116.                Left            =   90
  117.                TabIndex        =   9
  118.                TagWidth        =   1200
  119.                Top             =   90
  120.                Width           =   2265
  121.                Begin TextBox Text1 
  122.                   BackColor       =   &H00FFFFFF&
  123.                   FontBold        =   0   'False
  124.                   FontItalic      =   0   'False
  125.                   FontName        =   "MS Sans Serif"
  126.                   FontSize        =   8.25
  127.                   FontStrikethru  =   0   'False
  128.                   FontUnderline   =   0   'False
  129.                   Height          =   285
  130.                   Index           =   3
  131.                   Left            =   1290
  132.                   TabIndex        =   13
  133.                   Tag             =   "Department"
  134.                   Top             =   1260
  135.                   Width           =   885
  136.                End
  137.                Begin TextBox Text1 
  138.                   BackColor       =   &H00FFFFFF&
  139.                   FontBold        =   0   'False
  140.                   FontItalic      =   0   'False
  141.                   FontName        =   "MS Sans Serif"
  142.                   FontSize        =   8.25
  143.                   FontStrikethru  =   0   'False
  144.                   FontUnderline   =   0   'False
  145.                   Height          =   300
  146.                   Index           =   2
  147.                   Left            =   1290
  148.                   TabIndex        =   12
  149.                   Tag             =   "Company"
  150.                   Top             =   870
  151.                   Width           =   885
  152.                End
  153.                Begin TextBox Text1 
  154.                   BackColor       =   &H00FFFFFF&
  155.                   FontBold        =   0   'False
  156.                   FontItalic      =   0   'False
  157.                   FontName        =   "MS Sans Serif"
  158.                   FontSize        =   8.25
  159.                   FontStrikethru  =   0   'False
  160.                   FontUnderline   =   0   'False
  161.                   Height          =   300
  162.                   Index           =   1
  163.                   Left            =   1290
  164.                   TabIndex        =   11
  165.                   Tag             =   "Last Name"
  166.                   Top             =   90
  167.                   Width           =   885
  168.                End
  169.                Begin TextBox Text1 
  170.                   BackColor       =   &H00FFFFFF&
  171.                   FontBold        =   0   'False
  172.                   FontItalic      =   0   'False
  173.                   FontName        =   "MS Sans Serif"
  174.                   FontSize        =   8.25
  175.                   FontStrikethru  =   0   'False
  176.                   FontUnderline   =   0   'False
  177.                   Height          =   300
  178.                   Index           =   0
  179.                   Left            =   1290
  180.                   TabIndex        =   10
  181.                   Tag             =   "First Name"
  182.                   Top             =   480
  183.                   Width           =   885
  184.                End
  185.             End
  186.          End
  187.       End
  188.    End
  189.    Begin VideoSoftElastic StatusBar 
  190.       Align           =   2  'Align Bottom
  191.       AutoSizeChildren=   1  'Even Horizontal
  192.       BackColor       =   &H00C0C0C0&
  193.       BevelOuter      =   0  'None
  194.       Height          =   555
  195.       Left            =   0
  196.       TabIndex        =   3
  197.       Top             =   4995
  198.       Width           =   6195
  199.       Begin CommandButton Button 
  200.          BackColor       =   &H00C0C0C0&
  201.          Caption         =   "BackS&heets"
  202.          FontBold        =   0   'False
  203.          FontItalic      =   0   'False
  204.          FontName        =   "MS Sans Serif"
  205.          FontSize        =   8.25
  206.          FontStrikethru  =   0   'False
  207.          FontUnderline   =   0   'False
  208.          Height          =   375
  209.          Index           =   4
  210.          Left            =   4980
  211.          TabIndex        =   8
  212.          Top             =   90
  213.          Width           =   1125
  214.       End
  215.       Begin CommandButton Button 
  216.          BackColor       =   &H00C0C0C0&
  217.          Caption         =   "&ForeColor"
  218.          FontBold        =   0   'False
  219.          FontItalic      =   0   'False
  220.          FontName        =   "MS Sans Serif"
  221.          FontSize        =   8.25
  222.          FontStrikethru  =   0   'False
  223.          FontUnderline   =   0   'False
  224.          Height          =   375
  225.          Index           =   3
  226.          Left            =   3765
  227.          TabIndex        =   7
  228.          Top             =   90
  229.          Width           =   1125
  230.       End
  231.       Begin CommandButton Button 
  232.          BackColor       =   &H00C0C0C0&
  233.          Caption         =   "&BackTabColor"
  234.          FontBold        =   0   'False
  235.          FontItalic      =   0   'False
  236.          FontName        =   "MS Sans Serif"
  237.          FontSize        =   8.25
  238.          FontStrikethru  =   0   'False
  239.          FontUnderline   =   0   'False
  240.          Height          =   375
  241.          Index           =   2
  242.          Left            =   2550
  243.          TabIndex        =   6
  244.          Top             =   90
  245.          Width           =   1125
  246.       End
  247.       Begin CommandButton Button 
  248.          BackColor       =   &H00C0C0C0&
  249.          Caption         =   "&Style"
  250.          FontBold        =   0   'False
  251.          FontItalic      =   0   'False
  252.          FontName        =   "MS Sans Serif"
  253.          FontSize        =   8.25
  254.          FontStrikethru  =   0   'False
  255.          FontUnderline   =   0   'False
  256.          Height          =   375
  257.          Index           =   1
  258.          Left            =   1320
  259.          TabIndex        =   5
  260.          Top             =   90
  261.          Width           =   1140
  262.       End
  263.       Begin CommandButton Button 
  264.          BackColor       =   &H00C0C0C0&
  265.          Caption         =   "&Position"
  266.          FontBold        =   0   'False
  267.          FontItalic      =   0   'False
  268.          FontName        =   "MS Sans Serif"
  269.          FontSize        =   8.25
  270.          FontStrikethru  =   0   'False
  271.          FontUnderline   =   0   'False
  272.          Height          =   375
  273.          Index           =   0
  274.          Left            =   90
  275.          TabIndex        =   4
  276.          Top             =   90
  277.          Width           =   1140
  278.       End
  279.    End
  280. Option Explicit
  281. Sub Button_Click (Index As Integer)
  282.   Select Case Index
  283.     Case 0    'Changes Tab positions
  284.        VSindextab1(0).Position = (VSindextab1(0).Position + 1) Mod 5
  285.     Case 1    'Changes tab styles
  286.        VSindextab1(0).Style = (VSindextab1(0).Style + 2) Mod 6
  287.        
  288.     Case 2    'Changes back tab color
  289.        VSindextab1(0).BackTabColor = QBColor(Rnd * 15)
  290.     Case 3    'Changes Caption text color
  291.        VSindextab1(0).ForeColor = QBColor(Rnd * 15)
  292.        
  293.     Case 4    'Changes BackSheets style
  294.       VSindextab1(0).BackSheets = (VSindextab1(0).BackSheets + 1) Mod 3
  295.   End Select
  296. End Sub
  297.