home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch16 / flxlabel / cptnprop.pag next >
Encoding:
Text File  |  1996-05-11  |  4.8 KB  |  165 lines

  1. VERSION 5.00
  2. Begin VB.PropertyPage CaptionProperties 
  3.    Caption         =   "Text Properties"
  4.    ClientHeight    =   3495
  5.    ClientLeft      =   0
  6.    ClientTop       =   0
  7.    ClientWidth     =   5925
  8.    PaletteMode     =   0  'Halftone
  9.    ScaleHeight     =   3495
  10.    ScaleWidth      =   5925
  11.    Begin VB.ComboBox Combo2 
  12.       BeginProperty Font 
  13.          Name            =   "Verdana"
  14.          Size            =   9.75
  15.          Charset         =   0
  16.          Weight          =   400
  17.          Underline       =   0   'False
  18.          Italic          =   0   'False
  19.          Strikethrough   =   0   'False
  20.       EndProperty
  21.       Height          =   360
  22.       Left            =   3345
  23.       Style           =   2  'Dropdown List
  24.       TabIndex        =   4
  25.       Top             =   1365
  26.       Width           =   2385
  27.    End
  28.    Begin VB.ComboBox Combo1 
  29.       BeginProperty Font 
  30.          Name            =   "Verdana"
  31.          Size            =   9.75
  32.          Charset         =   0
  33.          Weight          =   400
  34.          Underline       =   0   'False
  35.          Italic          =   0   'False
  36.          Strikethrough   =   0   'False
  37.       EndProperty
  38.       Height          =   360
  39.       Left            =   90
  40.       Style           =   2  'Dropdown List
  41.       TabIndex        =   2
  42.       Top             =   1305
  43.       Width           =   2415
  44.    End
  45.    Begin VB.TextBox txtCaption 
  46.       BeginProperty Font 
  47.          Name            =   "Verdana"
  48.          Size            =   9.75
  49.          Charset         =   0
  50.          Weight          =   400
  51.          Underline       =   0   'False
  52.          Italic          =   0   'False
  53.          Strikethrough   =   0   'False
  54.       EndProperty
  55.       Height          =   360
  56.       Left            =   90
  57.       TabIndex        =   1
  58.       Top             =   420
  59.       Width           =   5610
  60.    End
  61.    Begin VB.Label Label2 
  62.       Caption         =   "Text Effect"
  63.       BeginProperty Font 
  64.          Name            =   "Verdana"
  65.          Size            =   9.75
  66.          Charset         =   0
  67.          Weight          =   400
  68.          Underline       =   0   'False
  69.          Italic          =   0   'False
  70.          Strikethrough   =   0   'False
  71.       EndProperty
  72.       Height          =   285
  73.       Left            =   3345
  74.       TabIndex        =   5
  75.       Top             =   1005
  76.       Width           =   1950
  77.    End
  78.    Begin VB.Label Label1 
  79.       Caption         =   "Text Alignment"
  80.       BeginProperty Font 
  81.          Name            =   "Verdana"
  82.          Size            =   9.75
  83.          Charset         =   0
  84.          Weight          =   400
  85.          Underline       =   0   'False
  86.          Italic          =   0   'False
  87.          Strikethrough   =   0   'False
  88.       EndProperty
  89.       Height          =   285
  90.       Left            =   90
  91.       TabIndex        =   3
  92.       Top             =   945
  93.       Width           =   1950
  94.    End
  95.    Begin VB.Label lblCaption 
  96.       Caption         =   "Caption:"
  97.       BeginProperty Font 
  98.          Name            =   "Verdana"
  99.          Size            =   9.75
  100.          Charset         =   0
  101.          Weight          =   400
  102.          Underline       =   0   'False
  103.          Italic          =   0   'False
  104.          Strikethrough   =   0   'False
  105.       EndProperty
  106.       Height          =   240
  107.       Left            =   90
  108.       TabIndex        =   0
  109.       Top             =   165
  110.       Width           =   2700
  111.    End
  112. End
  113. Attribute VB_Name = "CaptionProperties"
  114. Attribute VB_GlobalNameSpace = False
  115. Attribute VB_Creatable = True
  116. Attribute VB_PredeclaredId = False
  117. Attribute VB_Exposed = True
  118. Private Sub PropertyPage_Initialize()
  119.     Combo1.AddItem "Top Left"
  120.     Combo1.AddItem "Top Middle"
  121.     Combo1.AddItem "Top Right"
  122.     Combo1.AddItem "Center Left"
  123.     Combo1.AddItem "Center Middle"
  124.     Combo1.AddItem "Center Right"
  125.     Combo1.AddItem "Bottom Left"
  126.     Combo1.AddItem "Bottom Middle"
  127.     Combo1.AddItem "Bottom Right"
  128.     
  129.     Combo2.AddItem "None"
  130.     Combo2.AddItem "Carved Light"
  131.     Combo2.AddItem "Carved"
  132.     Combo2.AddItem "Carved Heavy"
  133.     Combo2.AddItem "Raised Light"
  134.     Combo2.AddItem "Raised"
  135.     Combo2.AddItem "Raised Heavy"
  136.  
  137. End Sub
  138.  
  139. Private Sub txtCaption_Change()
  140.     Changed = True
  141. End Sub
  142.  
  143. Private Sub combo1_click()
  144.     Changed = True
  145. End Sub
  146.  
  147. Private Sub combo2_click()
  148.     Changed = True
  149. End Sub
  150.  
  151. Private Sub PropertyPage_ApplyChanges()
  152.     SelectedControls(0).Caption = txtCaption.Text
  153.     SelectedControls(0).TextAlignment = Combo1.ListIndex
  154.     SelectedControls(0).Effect = Combo2.ListIndex
  155. End Sub
  156.  
  157.  
  158. Private Sub PropertyPage_SelectionChanged()
  159.     txtCaption.Text = SelectedControls(0).Caption
  160.     Combo1.ListIndex = SelectedControls(0).TextAlignment
  161.     Combo2.ListIndex = SelectedControls(0).Effect
  162. End Sub
  163.  
  164.  
  165.