I'm busy (trying!) to create a UserControl that uses a MSFlexGrid with a button or three for adding rows/cols and removing rows/cols at runtime. I've got most of the events and properties figured out (i hope!)
My problem is I can't get the font figured out. How do I set the Font property of the MSFlexgrid in my UserControl? I don't want to change the Font of the buttons in the UserControl only the MSFlexGrid.
I've got the Font property into the UserControl and can choose the Font for the UserControl at design time but can't get the MSFlexGrid to show the chosen Font. It reverts back to the font I used for the MSFlexGrid while designing the UserControl.
Has done the following (the MSFlexGrid in the UserControl are named MSFG):
In UserControl.WriteProperties
In UserControl.ReadPropertiesCode:PropBag.WriteProperty "Font", Font, UserControl.Font
And the Property Get and Set functionsCode:Set Font = PropBag.ReadProperty("Font", Ambient.Font)
Any and all help appreciated. This is driving me nuts!Code:Public Property Get Font() As Font Set Font = UserControl.Font End Property Public Property Set Font(ByVal fntNewFont As Font) Set UserControl.Font = fntNewFont Set MSFG.Font = UserControl.Font UserControl.PropertyChanged "Font" End Property




Reply With Quote