is there any resource to capitulizer letter?

General TRichView support forum. Please post your questions here
Post Reply
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

is there any resource to capitulizer letter?

Post by alexandreq »

Hello

I'd like if it is possible to capitulizer a letter, a resource like MS Word has.

thanks
Alexandre
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Like this?
Image
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

Yeah :))

How did you do that?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

A label item (TRVLabelItemInfo) with VAlign=rvvaLeft
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

Hi Sergey

I found an example that comes with your component, named insertControls.

I understood how to do that, but it isn't so fine as your example, as you can see in the image:

Image

you did something more than this code?

var
c : TSRVLabel;
begin
c := TSRVLabel.Create(nil);
c.Parent := SRichViewEdit1.RichViewEdit;
c.Name := 'SRVLabel';
c.Caption := 'SRVLabel';
SRichViewEdit1.RichViewEdit.InsertControl('teste', c, rvvaMiddle);
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Well, I noticed that SRVLabel does not recalculate its size after changing font. It will be fixed. In the current version, assign c.AutoSize := True after changing font.

PS: yes, TSRVLabel can be used instead of TRVLabelItemInfo
(TSRVLabel is a control, while TRVLabelItemInfo is an item type, like a picture or a table).
However, TRVLabelItemInfo has a useful property: RemoveInternalLeading. It allows to remove unnecessary extra vertical spacing, so it looks better as a drop-cap.
Post Reply