Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Thread Tools Display Modes
Old 11-24-2008, 11:38 AM
sbosoftware sbosoftware is offline
Junior Member
Join Date: Nov 2006
Posts: 14

I am using dbrichedit.
I want to have a default font which is allways used when inserting a new record.

I have put this in my beforeinsert event

form1.frame61.dbmemo3.Font.Name := form1.letter;
form1.frame61.dbmemo3.Font.Size := strtoint(form1.grootte);
form1.frame61.dbmemo4.Font.Name := form1.letter;
form1.frame61.dbmemo4.Font.Size := strtoint(form1.grootte);
form1.frame61.dbmemo7.Font.Name := form1.letter;
form1.frame61.dbmemo7.Font.Size := strtoint(form1.grootte);

But when I use another font (when using a paste)
and I do an insert , it seems that the font from this paste is used and not the one from my beforeinsert event.

How can it be done?
Reply With Quote
Old 08-20-2009, 11:40 AM
digitiger digitiger is offline
Senior Member
Join Date: Jan 2001
Posts: 716
Lightbulb use OnChange event of DBRichedit

The obvious problem is that you have been setting the font properties just before text is pasted but during the paste operation, those properties which were successfully set by you get overwritten by the properties of inserted text.

So you need to reset the properties after text operation has been completed.

You can do this by inserting the required code in "OnChange" event of the DBRichedit control.

hope it helps.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:04 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.