I migrated from Delphi v7 to Delphi XE2. I am trying to use a fontdialog with two dbrichedit and a dbedit control. The code I used to accomplish the task works fine in Delphi v7, but it does not work with XE2. I think it must be some simple thing I have overlooked. I have worked on resolving the issue for over a week, but I am too close to the problem to see it I think.
I used a button to execute fontdialog and an apply event to manipulate the text.
Code:
if ActiveControl is TDBEdit then
with ActiveControl as
TdbEdit do
Font.Assign(TFontDialog(Sender).Font)
else if ActiveControl is TDBRichEdit then
with ActiveControl as TDBRichEdit do
SelAttributes.Assign(TFontDialog(Sender).Font)
Nothing happens.
Is there a property for form1 that I have overlooked?