TDBRichEdit font

Hi

I try to use on my app a TDBRichEdit component.
When I start to type on this component the default text is automatic on Bold
On the properties the font is set to regular.

How can I make the default font to regular
Thanks Sorin
0
Sorin
7/18/2015 8:05:00 AM
embarcadero.delphi.vcl.using 2297 articles. 1 followers. Follow

4 Replies
526 Views

Similar Articles

[PageSpeed] 49

Sorin Hershcu wrote:

> Hi
> 
> I try to use on my app a TDBRichEdit component.
> When I start to type on this component the default text is automatic
> on Bold On the properties the font is set to regular.
> 
> How can I make the default font to regular

Set the DefAttributes property (if the control is empty) instead of
Font. If the control already contains rich text loaded from the
database, set SelAttributes instead, that changes the attributes for
the caret position if no text is selected, and that defines how
typed-in text is rendered.

The Font property is something the control inherits from TControl, and
it only makes sense for controls that display all content in the same
font.

-- 
Peter Below (TeamB)
0
Peter
7/20/2015 5:42:24 PM
Sorin Hershcu wrote:

> Hi
> 
> I try to use on my app a TDBRichEdit component.
> When I start to type on this component the default text is automatic
> on Bold On the properties the font is set to regular.
> 
> How can I make the default font to regular

Set the DefAttributes property (if the control is empty) instead of
Font. If the control already contains rich text loaded from the
database, set SelAttributes instead, that changes the attributes for
the caret position if no text is selected, and that defines how
typed-in text is rendered.

The Font property is something the control inherits from TControl, and
it only makes sense for controls that display all content in the same
font.

-- 
Peter Below (TeamB)
0
Peter
7/20/2015 5:43:57 PM
Thanks Peter

I try both:
DBRichEdit1.DefAttributes.Style := [];
DBRichEdit1.SelAttributes.Style := [];

Still the default is bold?

Sorin


"Peter Below"  wrote in message news:728488@forums.embarcadero.com... 

Sorin Hershcu wrote:

> Hi
> 
> I try to use on my app a TDBRichEdit component.
> When I start to type on this component the default text is automatic
> on Bold On the properties the font is set to regular.
> 
> How can I make the default font to regular

Set the DefAttributes property (if the control is empty) instead of
Font. If the control already contains rich text loaded from the
database, set SelAttributes instead, that changes the attributes for
the caret position if no text is selected, and that defines how
typed-in text is rendered.

The Font property is something the control inherits from TControl, and
it only makes sense for controls that display all content in the same
font.

-- 
Peter Below (TeamB)
0
Sorin
7/21/2015 2:42:13 PM
Sorin Hershcu wrote:

> Thanks Peter
> 
> I try both:
> DBRichEdit1.DefAttributes.Style := [];
> DBRichEdit1.SelAttributes.Style := [];
> 
> Still the default is bold?

Does the control contain rich text already, or will it load such text
from the database after you have set the attributes? The SelAttributes
will only apply to the current caret position, for instance. If you
move the caret after the statements above the new position may have
different style settings.

If you want to force all existing content to regular, for example, you
would have to do it like this:

  dbrichedit1.selectAll;
  dbrichedit1.SelAttributes.Style :=  [];
  dbrichedit1.SelStart := dbrichedit1.GetTextLen;

There used to be a sample application that showed how to build a simple
rich text editor around TRichedit. That showed how to configure a
toolbar menu to allow the user to select font styles etc.. This also
works with a TDBRichedit. I don't know if it still comes with recent
version of Delphi, though, appearendly I neglected to install the
samples for the RAD Studio version I have installed at the moment...



-- 
Peter Below (TeamB)
0
Peter
7/21/2015 5:31:49 PM
Reply:

Similar Artilces:

Delphi Editor font and TDBRichEdit font gives different results with same font. (Courier New 10)
Hello. When I use Delphi Editor the letter l (L) has a little bottom line and a little left side line at the top. This makes it clear that the letter is not a capital I or a pipe symbol. From options I can see that the editor font is Courier New size 10. When I copy text from the editor and into my TDBRichEdit that also has Courier New size 10, the letter l is just a vertical line with no small horizontal lines at bottom and top. So what is the difference between theese two, when the font is exactly the same? When experimenting a bit with the font in the TDBRichEdit, I find tha...

To use or not to use Delphi
Sadly, it seems to me that there is a sort of race between the two threads, for and against using Delphi in new projects, with more or less the same users posting in both threads. Arguments are fiercely debated in both camps. Borland had their own vision. As a community, now that Delphi has changed ownership I believe we should try to be more consistent, more clear, and more articulate in what we expect from Embercadero in terms of Delphi. We can contribute to keeping Delphi alive and moving in the right direction. "Laurent Cocea" schrieb: > Sadly, it seems to me that there ...

font!font!font!
Name: robbie Product: Firefox Summary: font!font!font! Comments: Firefox font is bad !Very bad! The only reason I don't want to use firefox is font problem . I know how to change the font on firefox but it just not good enough. Internet explorer font is excellent.It also the only thing better than firefox. Browser Details: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Foxy/1; .NET CLR 1.1.4322) ...

Spreadsheet component for use in Delphi VCL 2010
Good day I have been using the Flexcel component for reading and writing Excel spreadsheets in my Delphi VCL projects for some while and have been very happy. Unfortunately, though, a version for use with Excel 2007 format files (.XLSX) has been promised for years now but just never arrives and I have reached a stage where I just have to update some of my software. Can any body suggest alternatives and comment on their experience with these? I have no objection to buying a component although all my programs are for academic use by myself and colleagues/friends so cheaper would...

Actuall thread about vcl classes / components in C++ for use with delphi...
Hi All, I wanted to follow the topic that appears as a 'sub-thread' above... suspecting it would die... I'm sure many of us are interested in this topic. ( by 'sure' I mean absolutely certain...) It also brings to my mind the question, does anyone know of any references for us semi-delphi-literate C++ programmers that would like to read/write/modify delphi stuff? Thanks Everyone, (you know who you are... B) Bruce ...

Delphi 6
In preparation for applying a bug fix to one of the VCL modules (AxCtrls.pas), I have been trying to compile the original source code for the module in order to reproduce exactly the existing dcu. I have copied AxCtrls.pas to an empty directory, and have found that doing: dcc32 -q AxCtrls -$D- -$L- gives me a dcu which is identical in size to the one on Delphi6/Lib, with identical contents except for a few bytes near the beginning, which I assume are a compliation timestamp. However, I have been unsuccessful in duplicating the debug dcu in Delphi6/Lib/Debug. Using "-$D+ -$L+&q...

Delphi XE8 Send Notification from Parse using VCL app
Hello, I am learning the new Baas technology with XE8. I created a small app to receive notification on Android mobiles using Parse. Everything is working fine when the notification message is sent from Parse web site. However when my VCL app send the notification with BackendPush component, nothing is coming in mobile phone. The messages are sending correctly because I can see them on Parse site. Their status is different than the one sent from Parse . Here are my VCL messages Status on Parse: Type: API, target: Chanels. When sent on Parse site: Type : Campaign, Target: Everyone...

How do i get the font color of a TGroupBox when using vcl styles in XE7? [Edit]
I'm writing a Win32 app in XE7 using the VCL Luna Style. Sometimes a group box will need its caption color changed to alert the user that the data in the group box is required. So it's easy enough to set the StyleElements to [seBorder,seClient]. That allows me to change the font color and style. But then I want to change it back to the original color, the same color as other group box captions that are set to [seFont,seBorder,seClient]. So how do I get the font color of a TGroupBox when using VCL styles? This is what I've tried: {code} procedure TfrmMain.FormCreate(Sender: T...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

superreview granted: [Bug 230173] Mozilla use 15 point size font for characters with style {font-size:14px;} : [Attachment 138463] use float type for mPointSize
Christopher Blizzard <blizzard@mozilla.org> has granted Christopher Blizzard <blizzard@mozilla.org>'s request for superreview: Bug 230173: Mozilla use 15 point size font for characters with style {font-size:14px;} http://bugzilla.mozilla.org/show_bug.cgi?id=230173 Attachment 138463: use float type for mPointSize http://bugzilla.mozilla.org/attachment.cgi?id=138463&action=edit ...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

How design a COM using Delphi and Using in PB7?
I need some component, So, we want using DELPHI5 to develop a COM or Activex. What type of knowege or Skill I must know it. Can anyone tell us? from DRAOGN Can you explain what type of component you want to create? You may not need to a) build your own, or b) use Delphi. If the component should be used from within a PB application, you ought to use PB to develop it unless it is something that PB does not let you do. regards, Bill DRAGON wrote: > I need some component, So, we want using DELPHI5 to develop a COM or > Activex. > What type of knowege or Skill I ...

can i use delphi 2007 bpls in delphi 2009
can i use delphi 2007 bpls in delphi 2009 ? "Gaetan SIRY" skrev i meddelelsen news:8703@forums.codegear.com... > can i use delphi 2007 bpls in delphi 2009 ? No. -- Finn Tolderlund The compatiblity between D2006 and D2007 was unique. Normaly they can't be compatible because new version enhance/change the API. And D2009 defines String = Unicode where older version has String = Ansistring so D200x/Dx-BPL are 200% incompatible with D2009. ...

How to use a delphi XE3 obj file in delphi 2007?
Hi, I'm migrating an application from delphi 2007 to delphi XE3 and I would like to do it in several steps. To do this I need to use a part of my new code (XE3) in the current delphi 2007 application. So I want to use the .obj file from my XE3 file. I know I have to use the {$L 'Filename'} and I know that I have to declare the functions that I want to use in external in my D2007 project. I wanted to make an easy and simple example to see how it works with only 1 function 'hello world' compiled in obj with XE3 but I can't find the way to use it in D2007. In D200...

Font font = new Font
i am not sure if when i use   Font font = new Font("Free 3 of 9", 16); // Free 3 of 9 is a bar code Font   in my code if the end user does not have that font will it still reder corecly if i use it on a dinamicly generated grephic you know the code will allways work I supose you're trying to create an image with a barcode to print it and then read the barcode. Read this article. If your ASP.NET server has the font installed and you create an Image using that font, the client machine doesn't have to install it. I tried that some time ago, but the barcode...

Web resources about - TDBRichEdit font - embarcadero.delphi.vcl.using

Resources last updated: 2/4/2016 4:07:13 PM