Tab Key Behavior with Bulleted Lists in TRichViewEdit

General TRichView support forum. Please post your questions here
Post Reply
tomr
Posts: 33
Joined: Wed Dec 09, 2020 9:36 am

Tab Key Behavior with Bulleted Lists in TRichViewEdit

Post by tomr »

Hello Richview-Support,
I have the following question: Is it possible to indent bullet points with a tab in TRichview?
In my Richviewedit i have these bullet points
BulletPoints Ausgangssituation.png
BulletPoints Ausgangssituation.png (1.19 KiB) Viewed 4430 times
If I press tab, only the text moves.+
BulletPoints Verschoben.png
BulletPoints Verschoben.png (1.54 KiB) Viewed 4430 times
In Word, the next indent will be triggered.
BulletPoints Word.png
BulletPoints Word.png (2.66 KiB) Viewed 4430 times
Kind Regards
Tom
standay
Posts: 289
Joined: Fri Jun 18, 2021 3:07 pm

Re: Tab Key Behavior with Bulleted Lists in TRichViewEdit

Post by standay »

I use the TrvActionIndentDec (action for "Decrease Indent" command) and TrvActionIndentInc (action for "Increase Indent" command) actions. I have those assigned to some toolbar buttons.

I also put this into the rveKeyPress event so I can select some text and move it in or out using tab/shift+tab like the Delphi IDE:

Code: Select all

  if Key=#9 then
  begin
    if rve.SelectionExists then
    begin
      Key := #0;
      //Shift + Tab when text selected (remove tabs):
      if (GetKeyState( VK_SHIFT ) and $8000 <> 0) then
      begin
        RVEParagraphrvActionIndentDec1.ExecuteTarget(rve);
      end
      else //Tab when text selected (add tabs)
      begin
        RVEParagraphrvActionIndentInc1.ExecuteTarget(rve);
      end;
    end;
  end;
Sergey may have some other answer(s) but that's what I use. It works on bulleted text.

Stan
Post Reply