home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Windows 95 Special 2 / WIN95_2.bin / utils / envelop / envelop.6 / Tools / Bootcamp / basic / label / label.eto < prev    next >
Encoding:
Text File  |  1996-07-08  |  3.8 KB  |  147 lines

  1. Type LabelMasterForm From SampleMasterForm
  2.   Dim Label1 As New Label
  3.   Dim optLeft As New OptionButton
  4.   Dim optCenter As New OptionButton
  5.   Dim optRight As New OptionButton
  6.   Dim Label2 As New Label
  7.   Dim optNone As New OptionButton
  8.   Dim optLine As New OptionButton
  9.   Dim Label3 As New Label
  10.   Dim chkWordWrap As New CheckBox
  11.   Dim lblWelcome As New Label
  12.   Dim FontWelcome As New Font
  13.  
  14.   ' METHODS for object: LabelMasterForm
  15.   Sub optLeft_Click()
  16.     lblWelcome.Alignment = "Left"
  17.     chkWordWrap.Enabled = True
  18.   End Sub
  19.  
  20.   Sub optCenter_Click()
  21.     lblWelcome.Alignment = "Center"
  22.     chkWordWrap.Value = 1
  23.     chkWordWrap.Enabled = False
  24.   End Sub
  25.  
  26.   Sub optRight_Click()
  27.     lblWelcome.Alignment = "Right"
  28.     chkWordWrap.Value = 1
  29.     chkWordWrap.Enabled = False
  30.   End Sub
  31.  
  32.   Sub chkWordWrap_Click()
  33.     If chkWordWrap.Value Then 
  34.       lblWelcome.WordWrap = True
  35.     Else 
  36.       lblWelcome.WordWrap = False
  37.     End If
  38.   End Sub
  39.  
  40.   Sub optNone_Click()
  41.     lblWelcome.BorderStyle = 0
  42.   End Sub
  43.  
  44.   Sub optLine_Click()
  45.     lblWelcome.BorderStyle = 1
  46.   End Sub
  47.  
  48.   Sub ResetApplication_Click ()
  49.     ' If the form is not loaded yet, then get it loaded and pop out of here.
  50.     If hWnd == 0 Then 
  51.       LoadForm
  52.       Exit Sub
  53.     End If
  54.   
  55.     ' Setup Alignment default
  56.     optCenter.Value = True
  57.     optLeft.Value = False
  58.     optRight.Value = False
  59.   
  60.     ' Setup Border style default
  61.     optNone.Value = True
  62.     optLine.Value = False
  63.   
  64.     ' Setup Word wrap default
  65.     chkWordWrap.Value = 1
  66.   
  67.     ' Setup label defaults
  68.     lblWelcome.Alignment = "Center"
  69.     lblWelcome.BorderStyle = "None"
  70.     lblWelcome.WordWrap = True
  71.   
  72.   End Sub
  73.  
  74. End Type
  75.  
  76. Begin Code
  77. ' Reconstruction commands for object: LabelMasterForm
  78. '
  79.   With LabelMasterForm
  80.     .Caption := "Label Demonstration"
  81.     .Move(3930, 2055, 6255, 3675)
  82.     .SampleDir := "W:\examples\label\"
  83.     .SampleName := "label"
  84.     With .Label1
  85.       .Caption := "1. Alignment"
  86.       .ForeColor := 13107200
  87.       .Move(300, 300, 1350, 300)
  88.     End With  'LabelMasterForm.Label1
  89.     With .optLeft
  90.       .Caption := "Left"
  91.       .Move(450, 750, 1200, 300)
  92.       .TabStop := True
  93.       .TabGroup := True
  94.       .Value := True
  95.     End With  'LabelMasterForm.optLeft
  96.     With .optCenter
  97.       .Caption := "Center"
  98.       .Move(450, 1050, 1200, 300)
  99.     End With  'LabelMasterForm.optCenter
  100.     With .optRight
  101.       .Caption := "Right"
  102.       .Move(450, 1350, 1200, 300)
  103.     End With  'LabelMasterForm.optRight
  104.     With .Label2
  105.       .Caption := "2. Border Style"
  106.       .ForeColor := 13107200
  107.       .Move(2250, 300, 1800, 300)
  108.     End With  'LabelMasterForm.Label2
  109.     With .optNone
  110.       .Caption := "None"
  111.       .Move(2400, 750, 1350, 300)
  112.       .TabStop := True
  113.       .TabGroup := True
  114.       .Value := True
  115.     End With  'LabelMasterForm.optNone
  116.     With .optLine
  117.       .Caption := "Line"
  118.       .Move(2400, 1050, 1350, 300)
  119.     End With  'LabelMasterForm.optLine
  120.     With .Label3
  121.       .Caption := "3. Word Wrap"
  122.       .ForeColor := 13107200
  123.       .Move(4350, 300, 1650, 300)
  124.     End With  'LabelMasterForm.Label3
  125.     With .chkWordWrap
  126.       .Caption := "On"
  127.       .Move(4500, 750, 1050, 300)
  128.       .TabGroup := True
  129.     End With  'LabelMasterForm.chkWordWrap
  130.     With .lblWelcome
  131.       .Caption := "Welcome to the Label Demonstration!"
  132.       .ForeColor := 0
  133.       .Font := LabelMasterForm.FontWelcome
  134.       .Move(300, 1950, 5250, 750)
  135.       .WordWrap := False
  136.     End With  'LabelMasterForm.lblWelcome
  137.     With .FontWelcome
  138.       .FaceName := "vtspecl_132_dblhiwide"
  139.       .Size := 18
  140.       .Bold := False
  141.     End With  'LabelMasterForm.FontWelcome
  142.     With .helpfile
  143.       .FileName := "W:\examples\label\label.hlp"
  144.     End With  'LabelMasterForm.helpfile
  145.   End With  'LabelMasterForm
  146. End Code
  147.