home *** CD-ROM | disk | FTP | other *** search
-
- Public Property Get BackColor() As OLE_COLOR
-
- ' The control's BackColor property is "stored" in
- ' the UserControl object's BackColor property.
- BackColor = UserControl.BackColor
-
- End Property
-
-
- Public Property Let BackColor(ByVal NewValue As OLE_COLOR)
-
- ' The control's new BackColor value is passed
- ' directly to the UserControl object's BackColor
- ' property.
- UserControl.BackColor = NewValue
- UserControl.PropertyChanged "BackColor"
-
- ' Store the new BackColor value in a "holding"
- ' variable for later use.
- molcBackColor = NewValue
-
- End Property
-
-
- Public Property Get BorderStyle() As lbBorderStyleTypes
-
- ' The control's BorderStyle property is "stored" in
- ' the UserControl object's BorderStyle property.
- BorderStyle = UserControl.BorderStyle
-
- End Property
-
-
- Public Property Let BorderStyle(ByVal NewValue As lbBorderStyleTypes)
-
- ' Make sure that the value being assigned to the
- ' BorderStyle property is valid.
- If NewValue = None Or NewValue = [Fixed Single] Then
- ' The control's new BorderStyle value is passed
- ' directly to the UserControl object's BorderStyle
- ' property.
- UserControl.BorderStyle = NewValue
- UserControl.PropertyChanged "BorderStyle"
- Else
- ' Invalid BorderStyle value - raise an error.
- Err.Raise Number:=vbObjectError + 32112, _
- Description:="Invalid BorderStyle value (0 or 1 only)"
- End If
-
- End Property
-
-
- Public Property Get ButtonMode() As lbModeTypes
-
- ' The ButtonMode property is stored in a "holding"
- ' variable, mmodButtonMode.
- ButtonMode = mmodButtonMode
-
- End Property
-
-
- Public Property Let ButtonMode(ByVal NewValue As lbModeTypes)
-
- ' Don't let a new value be assigned to
- ' mmodButtonMode (ButtonMode's "holding" variable)
- ' unless it is valid.
- If NewValue = [Text Only Mode] Or NewValue = [Image Mode] Then
- mmodButtonMode = NewValue
- ' If ButtonMode is Text Only Mode (0), show
- ' the lblCaption object. If ButtonMode is
- ' Image Mode (1), hide the lblCaption object.
- If mmodButtonMode = [Text Only Mode] Then lblCaption.Visible = True
- If mmodButtonMode = [Image Mode] Then lblCaption.Visible = False
- UserControl.PropertyChanged "ButtonMode"
- Else
- ' Invalid ButtonMode value - raise an error.
- Err.Raise Number:=vbObjectError + 32113, _
- Description:="Invalid ButtonMode value (0 or 1 only)"
- End If
-
- End Property
-
-
- Public Property Get Font() As StdFont
-
- ' The value for the control's Font property is
- ' "stored" in the lblCaption object's Font property.
- Set Font = lblCaption.Font
-
- End Property
-
-
- Public Property Set Font(ByVal NewValue As StdFont)
-
- ' Store the control's new Font value in the
- ' lblCaption object's Font property.
- Set lblCaption.Font = NewValue
- UserControl.PropertyChanged "Font"
-
- End Property
-
-
- Public Property Get ForeColor() As OLE_COLOR
-
- ' The control's ForeColor property is "stored" in
- ' lblCaption's ForeColor property.
- ForeColor = lblCaption.ForeColor
-
- End Property
-
-
- Public Property Let ForeColor(ByVal NewValue As OLE_COLOR)
-
- ' The control's new ForeColor value is passed
- ' directly to lblCaption's ForeColor property.
- lblCaption.ForeColor = NewValue
- UserControl.PropertyChanged "ForeColor"
-
- End Property
-
-
- Public Property Get Picture() As StdPicture
-
- ' The control's Picture property is "stored" in
- ' the UserControl object's Picture property.
- Set Picture = UserControl.Picture
-
- End Property
-
-
- Public Property Set Picture(ByVal NewValue As StdPicture)
-
- ' First, change UserControl's Picture property to
- ' display the image selected.
- Set UserControl.Picture = NewValue
-
- ' Then store the new image in a "holding" picture
- ' object.
- Set mpicPicture = NewValue
-
- ' If Picture's image is Nothing, set the ButtonMode
- ' property back to Text Only Mode (0). If Picture
- ' does contain an image, set the ButtonMode
- ' property to Image Mode (1).
- If NewValue Is Nothing Then
- ButtonMode = [Text Only Mode]
- Else
- ButtonMode = [Image Mode]
- End If
-
- UserControl.PropertyChanged "Picture"
-
- End Property
-
-
- Public Property Get SelColor() As OLE_COLOR
-
- ' The control's SelColor property is stored in a
- ' "holding" variable, molcSelColor.
- SelColor = molcSelColor
-
- End Property
-
-
- Public Property Let SelColor(ByVal NewValue As OLE_COLOR)
-
- ' Store SelColor's new value in a "holding"
- ' variable, molcSelColor.
- molcSelColor = NewValue
- UserControl.PropertyChanged "SelColor"
-
- End Property
-
-
- Public Property Get SelPicture() As StdPicture
-
- ' SelPicture's image is retrieved from a "holding"
- ' picture object, mpicSelPicture.
- Set SelPicture = mpicSelPicture
-
- End Property
-
-
- Public Property Set SelPicture(ByVal NewValue As StdPicture)
-
- ' Store SelPicture's new value in a "holding"
- ' picture object, mpicSelPicture.
- Set mpicSelPicture = NewValue
- UserControl.PropertyChanged "SelPicture"
-
- End Property
-