Removing a table from RichViewEdit
Removing a table from RichViewEdit
Please bear with me as im new here and new to the component, how may i remove a table inserted in the richviewedit?
-
- Site Admin
- Posts: 17839
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Removing a table from RichViewEdit
In TRichViewEdit, you can place the caret before and after the table.
If the caret is before the table, pressing DELETE removes the table.
If the caret is after the table, pressing BACKSPACE removes the table.
If the table is selected, deleting selection (by DELETE or BACKSPACE) removes the table.
Also, In RichViewActions, the command that deletes the table is implemented by TrvActionTableDeleteTable
If the caret is before the table, pressing DELETE removes the table.
If the caret is after the table, pressing BACKSPACE removes the table.
If the table is selected, deleting selection (by DELETE or BACKSPACE) removes the table.
Also, In RichViewActions, the command that deletes the table is implemented by TrvActionTableDeleteTable
Re: Removing a table from RichViewEdit
TrvActionTableDeleteTable
how to use this one sir? and what needs to declare?
how to use this one sir? and what needs to declare?
-
- Site Admin
- Posts: 17839
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Removing a table from RichViewEdit
First, please note that RichViewActions are currently implemented only for VCL and Lazarus for Windows.
Versions for FireMonkey and Lazarus for Linux will be implemented later.
This action can be used just like other actions. Place TActionList component on a form, add actions to it at design time using "New Standard Action" command in the design-time editor of TActionList. Then assign it to Action property of a button or a menu item.
As you can see, you do not need to write code to use actions.
If you never used actions before, you can find information on the web, for example: https://docwiki.embarcadero.com/RADStud ... ction_List
As for RichViewActions (including the above-mentioned action), the simplest way to use them is to start from the ActionTest demo.
For new versions of Delphi (10.3 and newer), the demo is in <TRichView Dir>\RichViewActions\Demos\DelphiUnicode\ActionTest_MultiRes\ folder.
There are also versions of this demo for older versions of Delphi, Lazarus, and C++Builder.
This demo contains TActionList with actions, and datamodules with images for them.
See "Table | Delete Table" command in the main menu.
Versions for FireMonkey and Lazarus for Linux will be implemented later.
This action can be used just like other actions. Place TActionList component on a form, add actions to it at design time using "New Standard Action" command in the design-time editor of TActionList. Then assign it to Action property of a button or a menu item.
As you can see, you do not need to write code to use actions.
If you never used actions before, you can find information on the web, for example: https://docwiki.embarcadero.com/RADStud ... ction_List
As for RichViewActions (including the above-mentioned action), the simplest way to use them is to start from the ActionTest demo.
For new versions of Delphi (10.3 and newer), the demo is in <TRichView Dir>\RichViewActions\Demos\DelphiUnicode\ActionTest_MultiRes\ folder.
There are also versions of this demo for older versions of Delphi, Lazarus, and C++Builder.
This demo contains TActionList with actions, and datamodules with images for them.
See "Table | Delete Table" command in the main menu.
Re: Removing a table from RichViewEdit
Thank you so much sir, but sorry i forgot to say i need for fmx.
-
- Site Admin
- Posts: 17839
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Removing a table from RichViewEdit
You can use this code to delete the current table:
Code: Select all
var
Table: TRVTableItemInfo;
rve: TCustomRichViewEdit;
begin
if RichViewEdit1.GetCurrentItemEx(TRVTableItemInfo, rve, TCustomRVItemInfo(Table)) then
begin
rve.SetSelectionBounds(Table.GetMyItemNo, 0, Table.GetMyItemNo, 1);
rve.DeleteSelection;
end;
end;
Re: Removing a table from RichViewEdit
thanks so much sir, it worked like a charm...