The simplest solution is selecting the control on clicking on it: process OnMouseDown of controls, and call RichViewEdit.SelectControl() in it.
See the example in viewtopic.php?t=157 (how to resize and drag&drop controls in the editor).
Search found 9731 matches
- Fri Jun 06, 2025 11:14 am
- Forum: Support
- Topic: Getting item index of selected control
- Replies: 2
- Views: 17639
- Fri Jun 06, 2025 10:40 am
- Forum: Support
- Topic: RVFont/RvFontSize- Combobox preview on highlighted items possible
- Replies: 3
- Views: 19446
Re: RVFont/RvFontSize- Combobox preview on highlighted items possible
AutoComplete property for these combo boxes is False by default, intentionally.
Each time when autocomplete works, the font is applied, adding a new item to RVStyle.TextStyles (if there is no existing items with these properties).
While these items will be removed after the next call of ...
Each time when autocomplete works, the font is applied, adding a new item to RVStyle.TextStyles (if there is no existing items with these properties).
While these items will be removed after the next call of ...
- Tue Jun 03, 2025 3:41 pm
- Forum: Support
- Topic: Selected Text in font combobox ScaleRichviewEditor
- Replies: 3
- Views: 24929
Re: Selected Text in font combobox ScaleRichviewEditor
The demo uses a workaround,
const
WM_DESELECTCOMBO = WM_USER + 1;
In the form's interface section:
procedure WMDeselectCombo(var Msg: TMessage); message WM_DESELECTCOMBO;
procedure DeselectComboBoxes;
Implementation:
procedure TForm3.DeselectComboBoxes;
begin
cmbFontSize.SelLength := 0 ...
const
WM_DESELECTCOMBO = WM_USER + 1;
In the form's interface section:
procedure WMDeselectCombo(var Msg: TMessage); message WM_DESELECTCOMBO;
procedure DeselectComboBoxes;
Implementation:
procedure TForm3.DeselectComboBoxes;
begin
cmbFontSize.SelLength := 0 ...
- Sun Jun 01, 2025 2:24 pm
- Forum: Support
- Topic: Simulate a backspace key
- Replies: 4
- Views: 23562
Re: Simulate a backspace key
TCustomRichViewEdit has a method for processing Backspace:
procedure OnBackSpacePress(Ctrl: Boolean);
But this method is protected.
You can try to call it in this way:
type
TCustomRichViewEditHack = class (TCustomRichViewEdit)
end;
...
TCustomRichViewEditHack(RichViewEdit1.TopLevelEditor ...
procedure OnBackSpacePress(Ctrl: Boolean);
But this method is protected.
You can try to call it in this way:
type
TCustomRichViewEditHack = class (TCustomRichViewEdit)
end;
...
TCustomRichViewEditHack(RichViewEdit1.TopLevelEditor ...
- Sun Jun 01, 2025 2:13 pm
- Forum: Support
- Topic: How to Implement Custom Hyperlink Handling in TRichView with Delphi?
- Replies: 2
- Views: 14462
Re: How to Implement Custom Hyperlink Handling in TRichView with Delphi?
The correct event is OnJump
The help topic has an example code how to get a target of the clicked link (assuming that this target is stored in the item's tag).
PS: there is no OnRVHyperlink event. There is OnReadHyperlink event that occurs when reading hyperlinks from RTF, DocX, HTML, or Markdown ...
The help topic has an example code how to get a target of the clicked link (assuming that this target is stored in the item's tag).
PS: there is no OnRVHyperlink event. There is OnReadHyperlink event that occurs when reading hyperlinks from RTF, DocX, HTML, or Markdown ...
- Fri May 30, 2025 1:15 pm
- Forum: Support
- Topic: Building document on scroll
- Replies: 1
- Views: 13985
Re: Building document on scroll
Sorry, not supported yet.
- Fri May 30, 2025 1:13 pm
- Forum: Support
- Topic: Simulate a backspace key
- Replies: 4
- Views: 23562
Re: Simulate a backspace key
In VCL version, you can use SendMessage:
SendMessage(RichViewEdit1.TopLevelEditor.Handle, WM_KEYDOWN, VK_BACK, 0)
SendMessage(RichViewEdit1.TopLevelEditor.Handle, WM_KEYDOWN, VK_BACK, 0)
- Thu May 29, 2025 3:52 pm
- Forum: Support
- Topic: Activate Insert Key
- Replies: 2
- Views: 17210
Re: Activate Insert Key
Sorry, what's "insert key"?
- Wed May 28, 2025 11:26 am
- Forum: Support
- Topic: Copy RichView content to another RichView - Table style problem
- Replies: 2
- Views: 15747
Re: Copy RichView content to another RichView - Table style problem
Not all table properties can be saved to RTF.
Use SaveRVFToStream and LoadRVFToStream.
Use SaveRVFToStream and LoadRVFToStream.
- Tue May 27, 2025 8:08 pm
- Forum: Support
- Topic: Bookmarks spanning multiple paragraphs?
- Replies: 6
- Views: 27394
Re: Bookmarks spanning multiple paragraphs?
That topic is on the protected forum, accessible for registered TRichView users.
- Tue May 27, 2025 12:03 pm
- Forum: Support
- Topic: Bookmarks spanning multiple paragraphs?
- Replies: 6
- Views: 27394
Re: Bookmarks spanning multiple paragraphs?
In TRichView, a bookmark" does not have lengths, it marks a single place in a document.
I plan to implement lengths for bookmarks (most probably, by grouping them in pairs of starting and ending marks), but not in the near future, sorry.
The same for changes discussed in the referred topic.
I plan to implement lengths for bookmarks (most probably, by grouping them in pairs of starting and ending marks), but not in the near future, sorry.
The same for changes discussed in the referred topic.
- Mon May 26, 2025 7:45 pm
- Forum: Support
- Topic: Which EVENT triggered after loading RTF file?
- Replies: 3
- Views: 20463
Re: Which EVENT triggered after loading RTF file?
1. Sorry, but I cannot reproduce this problem with the mouse cursor.
I checked the demo in TRichView\Demos\Editors\Editor 1\
It has Screen.Cursor := crHourglass before loading, and Screen.Cursor := crDefault; after.
(the call of RichViewEdit1.Format is after restoring the cursor; it's not good, you ...
I checked the demo in TRichView\Demos\Editors\Editor 1\
It has Screen.Cursor := crHourglass before loading, and Screen.Cursor := crDefault; after.
(the call of RichViewEdit1.Format is after restoring the cursor; it's not good, you ...
- Sun May 25, 2025 8:04 pm
- Forum: Support
- Topic: Importing Hyperkinks in RTF adds drive path
- Replies: 2
- Views: 16565
Re: Importing Hyperkinks in RTF adds drive path
Assign RichView.RTFReadProperties.BasePathLinks = False.
- Sun May 25, 2025 8:02 pm
- Forum: Support
- Topic: Which EVENT triggered after loading RTF file?
- Replies: 3
- Views: 20463
Re: Which EVENT triggered after loading RTF file?
No event occurs after loading RTF file.
OnLoadDocument occurs when loading a document from DB via LiveBindings.
Even if this event existed, nothing would be changed.
Maybe it will work if you remove Application.ProcessMessages?
OnLoadDocument occurs when loading a document from DB via LiveBindings.
Even if this event existed, nothing would be changed.
Maybe it will work if you remove Application.ProcessMessages?
- Thu May 22, 2025 9:22 pm
- Forum: Support
- Topic: RTF issue in TRichViewEdit when created run-time
- Replies: 3
- Views: 19874
Re: RTF issue in TRichViewEdit when created run-time
The default property values are not optimal for RTF reading.
Unfortunately, they cannot be changed because of possible compatibility problems. Instead, optimal property values are assigned when the component is placed on a form at desigtime.
Assign
MyRichView.RTFReadProperties.TextStyleMode ...
Unfortunately, they cannot be changed because of possible compatibility problems. Instead, optimal property values are assigned when the component is placed on a form at desigtime.
Assign
MyRichView.RTFReadProperties.TextStyleMode ...