home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / datalist / datalist.exe / %MAINDIR% / SAMPLES / Sample8 / FORM1.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1998-03-09  |  3.8 KB  |  103 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Sorting Sample"
  4.    ClientHeight    =   4185
  5.    ClientLeft      =   3465
  6.    ClientTop       =   2670
  7.    ClientWidth     =   6135
  8.    Height          =   4635
  9.    Left            =   3405
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4185
  12.    ScaleWidth      =   6135
  13.    Top             =   2280
  14.    Width           =   6255
  15.    Begin DataList.GTList GTList1 
  16.       Height          =   3495
  17.       Left            =   360
  18.       TabIndex        =   0
  19.       Top             =   240
  20.       Width           =   5295
  21.       _Version        =   65536
  22.       DefColCaptionBorderStyle=   3
  23.       BeginProperty DefColCaptionFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  24.          Name            =   "MS Sans Serif"
  25.          Size            =   8.25
  26.          Charset         =   0
  27.          Weight          =   400
  28.          Underline       =   0   'False
  29.          Italic          =   0   'False
  30.          Strikethrough   =   0   'False
  31.       EndProperty
  32.       BeginProperty DefFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  33.          Name            =   "MS Sans Serif"
  34.          Size            =   8.25
  35.          Charset         =   0
  36.          Weight          =   400
  37.          Underline       =   0   'False
  38.          Italic          =   0   'False
  39.          Strikethrough   =   0   'False
  40.       EndProperty
  41.       BeginProperty ScrollTipFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  42.          Name            =   "MS Sans Serif"
  43.          Size            =   8.25
  44.          Charset         =   0
  45.          Weight          =   400
  46.          Underline       =   0   'False
  47.          Italic          =   0   'False
  48.          Strikethrough   =   0   'False
  49.       EndProperty
  50.       BeginProperty ExtendTipFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  51.          Name            =   "MS Sans Serif"
  52.          Size            =   8.25
  53.          Charset         =   0
  54.          Weight          =   400
  55.          Underline       =   0   'False
  56.          Italic          =   0   'False
  57.          Strikethrough   =   0   'False
  58.       EndProperty
  59.       LImgs.Count     =   1
  60.       _ExtentX        =   9340
  61.       _ExtentY        =   6165
  62.       _StockProps     =   81
  63.       BackColor       =   -2147483643
  64.    End
  65. Attribute VB_Name = "Form1"
  66. Attribute VB_Creatable = False
  67. Attribute VB_Exposed = False
  68. Option Explicit
  69. Private Sub Form_Load()
  70.     'First we want to define three columns
  71.     'The first two arguments in each of these
  72.     'method calls are left blank.  We do not
  73.     'want to specify a index or key
  74.     'The key properties will be initialized to
  75.     'an empty string and the indexs will be
  76.     'initialized to the next availible index
  77.     'This being 0, 1, and 2 in this case
  78.     GTList1.ColumnDefs.Add , , "First Name"
  79.     GTList1.ColumnDefs.Add , , "Last Name"
  80.     GTList1.ColumnDefs.Add , , "Age"
  81.     'Next we need to add some items to the list
  82.     'This is done by populating the ListItem
  83.     'collection.  The key and indexs are once
  84.     'again left blank.  The text specified for
  85.     'the listitem object goes into column 0.
  86.     GTList1.ListItems.Add , , "Joe"
  87.     GTList1.ListItems.Add , , "Jane"
  88.     GTList1.ListItems.Add , , "Ed"
  89.     'Now we have a list of three items each with
  90.     'only the first column populated.  To add data
  91.     'to the second and third column (column 1 and 2
  92.     'respectively), we must fill the subitem.text
  93.     'properties as follows
  94.     'This fills the second column for each item
  95.     GTList1.ListItems(0).SubItems(1).Text = "Shmoe"
  96.     GTList1.ListItems(1).SubItems(1).Text = "Doe"
  97.     GTList1.ListItems(2).SubItems(1).Text = "Johnson"
  98.     'This fills the third column for each item
  99.     GTList1.ListItems(0).SubItems(2).Text = "29"
  100.     GTList1.ListItems(1).SubItems(2).Text = "33"
  101.     GTList1.ListItems(2).SubItems(2).Text = "16"
  102. End Sub
  103.