Search found 13 matches

by JohnMirror
Thu Jul 07, 2011 11:19 am
Forum: ScaleRichView
Topic: centering selected text by scrolling
Replies: 10
Views: 44096

Hi. I've been using this code for some time and I noticed a problem with some texts and some particular settings in Page setup. I am able to reproduce the problem in ActionTest: http://www.mediafire.com/download.php?foy9j2tah06hpdh Just click on Button2 and after that 2 times on Ok. You'll get this ...
by JohnMirror
Thu Feb 17, 2011 4:37 pm
Forum: ScaleRichView
Topic: centering selected text by scrolling
Replies: 10
Views: 44096

It is working fine now :)
Thank you very much.
by JohnMirror
Thu Feb 17, 2011 11:37 am
Forum: ScaleRichView
Topic: underlining problem
Replies: 6
Views: 29842

Ok, thank you.
by JohnMirror
Sun Feb 13, 2011 9:24 pm
Forum: ScaleRichView
Topic: underlining problem
Replies: 6
Views: 29842

underlining problem

I found a nice function: AddMisspelling :) I started experimenting and a problem appeared: http://i56.tinypic.com/143gyep.png You notice that the underline is out of sync on first word (-1). This code was used (in ActionTest): var s: string; i, p: Integer; begin for i := 0 to SRichViewEdit1 ...
by JohnMirror
Sat Feb 12, 2011 10:12 pm
Forum: ScaleRichView
Topic: clear content manually without actions
Replies: 6
Views: 28809

Ok.
Maybe you'll implement for saving rtf too. On larger ones I wait 10..20 sec...
by JohnMirror
Sat Feb 12, 2011 6:10 pm
Forum: ScaleRichView
Topic: centering selected text by scrolling
Replies: 10
Views: 44096

Problem.
I found some big rtf's on which the centering function doesn't work well. It goes down dozens of pages after the location.
I tried in ActionTest too, no change.

The code from my friend works fine...

For example on this rtf: http://www.mediafire.com/download.php?g7fzq8qk1eqwhq2
by JohnMirror
Sat Feb 12, 2011 1:51 pm
Forum: ScaleRichView
Topic: clear content manually without actions
Replies: 6
Views: 28809

Ok.
If, between Clear and Format, sometimes I load a rtf, Format will use srv.onProgress too?
by JohnMirror
Sat Feb 12, 2011 7:44 am
Forum: ScaleRichView
Topic: clear content manually without actions
Replies: 6
Views: 28809

Ok, thanks.
by JohnMirror
Fri Feb 11, 2011 2:07 pm
Forum: ScaleRichView
Topic: clear content manually without actions
Replies: 6
Views: 28809

clear content manually without actions

How can I clear manually the content of ScaleRichView before loading another file..?
Is ScaleRichView.Clear good...?
Thank you.
by JohnMirror
Fri Feb 11, 2011 12:49 pm
Forum: ScaleRichView
Topic: centering selected text by scrolling
Replies: 10
Views: 44096

Thank you. I used your code to also popup the context menu at caret position when the user presses "windows context menu" key: procedure TForm1.SRichViewEdit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); var P: TPoint; Part: Integer; ItemR, PageR: TRect; begin if (Key = 93) and (Shift ...
by JohnMirror
Fri Feb 11, 2011 6:02 am
Forum: ScaleRichView
Topic: centering selected text by scrolling
Replies: 10
Views: 44096

By the way, how can you calculate the height of the item from the position of the caret? I tried to show a window below the text: GetWindowRect(SRichViewEdit1.Handle, r); Window.Top := r.Top + SRichViewEdit1.CaretPos.Y + RVData.DrawItems[SRichViewEdit1.RichViewEdit.CurItemNo].Height; But it was ...
by JohnMirror
Thu Feb 10, 2011 8:26 pm
Forum: ScaleRichView
Topic: centering selected text by scrolling
Replies: 10
Views: 44096

Thank you very much. A friend of mine gave me this code: SRichViewEdit1.VScrollPos := ((Round(SRichViewEdit1.CaretPos.Y - SRichViewEdit1.OffsetY) - (SRichViewEdit1.ClientHeight div 2)) div SRichViewEdit1.RichViewEdit.VSmallStep) - 1; But I think your code is better because it takes also the height ...
by JohnMirror
Fri Feb 04, 2011 12:30 am
Forum: ScaleRichView
Topic: centering selected text by scrolling
Replies: 10
Views: 44096

centering selected text by scrolling

Hi. I'm trying to center the selected text in ScaleRichView but I can't find a function for this. I mean by scrolling the text in fewest steps possible. I tried ScrollToCaret and ScrollToItem but they only bring the selected text in the view, they're not placing it in the middle (vertically and even ...