VERSION 5.00
Begin VB.UserControl UserControl1 
   ClientHeight    =   3600
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   3345
   ScaleHeight     =   3600
   ScaleWidth      =   3345
   Begin VB.ListBox List1 
      Height          =   2985
      Left            =   30
      TabIndex        =   0
      Top             =   45
      Width           =   2835
   End
End
Attribute VB_Name = "UserControl1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private WithEvents mFont    As StdFont
Attribute mFont.VB_VarHelpID = -1

Public Property Get FontSize() As Double
    FontSize = mFont.Size
End Property

Public Property Let FontSize(ByVal New_Size As Double)
    mFont.Size = New_Size
End Property

Public Property Get FontItalic() As Boolean
    FontItalic = mFont.Italic
End Property

Public Property Let FontItalic(ByVal New_Ital As Boolean)
    mFont.Italic = New_Ital
End Property

Public Property Get FontBold() As Boolean
    FontBold = mFont.Bold
End Property

Public Property Let FontBold(ByVal New_Bold As Boolean)
    mFont.Bold = New_Bold
End Property

Public Property Get Font() As StdFont
   Set Font = mFont
End Property

Public Property Set Font(mnewFont As StdFont)
   With mFont
      .Bold = mnewFont.Bold
      .Italic = mnewFont.Italic
      .Name = mnewFont.Name
      .Size = mnewFont.Size
   End With
   PropertyChanged "Font"
End Property

Private Sub UserControl_Initialize()
   Set mFont = New StdFont
   Set List1.Font = mFont
   List1.AddItem "TESTING... 1, 2, 3"
End Sub

Private Sub mFont_FontChanged(ByVal PropertyName As String)
   Set List1.Font = mFont
End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    
    With PropBag
        Font = .ReadProperty("Font", mFont)
        FontSize = .ReadProperty("FontSize", mFont.Size)
        FontBold = .ReadProperty("FontBold", False)
        FontItalic = .ReadProperty("FontItalic", False)
    End With

End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    
    With PropBag
        .WriteProperty "Font", mFont, ""
        .WriteProperty "FontSize", mFont.Size, ""
        .WriteProperty "FontBold", mFont.Bold, ""
        .WriteProperty "FontItalic", mFont.Italic, ""
    End With

End Sub


