font problem with forms and paintboxes
I have an app that uses a form and objects derived from a paintbox that are created at run-time. In the constructor for the objects I assign to the event handlers and some of the properties. The remainder of the properties are assigned from a text file after the object is created. The problem is that I cannot assign to the font of the paintbox canvas. I read the font name, size and color from the text file and assign them to the paintbox canvas font but the font always reverts back to the same font - the font of the underlying form. This occurs even if I subsequently change the underlying form's font - any objects subsequently created still take on the font that the form had at design-time. All other properties behave fine - apart from the font.
I have set the ParentFont property to FALSE in the constructor.
A paintbox added to the form at design time does not suffer from the problem - only ones created at run-time.