vahid Araghi
vahid Araghi

Reputation: 136

How to change label font with changing custom property grid in vb .net?

I have a label and a property grid that I customized that property grid, but changing the font in the property grid does not change the label font and I do not know how to link it to the label.
this is class for custom property grid:

Public Class GridSetting
    Private _LabelFont As System.Drawing.Font
 
    <CategoryAttribute("Design"), DefaultValueAttribute(""),
DescriptionAttribute("Select font for the Label")>
    Public Property LabelFont() As System.Drawing.Font

        Get
            Return _LabelFont

        End Get
        Set(ByVal Value As System.Drawing.Font)
            _LabelFont = Value
        End Set
    End Property
End Class

and this is my cod:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        PropertyGrid1.SelectedObject = New GridSetting

End Sub

How can I achieve that?

Upvotes: 0

Views: 195

Answers (0)

Related Questions