For example, after the user makes a selection, can i alter the selection so that it begins and ends with a complete paragraph being selected?
a kind of mean trick in OnChangeSelection
procedure TForm1.WPRichText1ChangeSelection(Sender: TObject);
begin
if WPRichText1.TextCursor.block_reverse then
begin
WPRichText1.TextCursor.block_e_posinpar := 0;
WPRichText1.TextCursor.block_s_posinpar := $FFFF;
end else
begin
WPRichText1.TextCursor.block_s_posinpar := 0;
WPRichText1.TextCursor.block_e_posinpar := $FFFF;
end;
end;
Regards,
Julian
#2♥ 0
This category is archived. No new posts are possible.