Jump to content

#ifdef

Members
  • Content Count

    57
  • Joined

  • Last visited

  • Days Won

    1

#ifdef last won the day on July 30

#ifdef had the most liked content!

Community Reputation

12 Good

Technical Information

  • Delphi-Version
    Delphi Community Edition

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. #ifdef

    Clipboard history

    Is there any way/API to get a clipboard history (Win + V)?
  2. #ifdef

    Delphi 12 is available

    I can't believe they did it πŸ₯²
  3. #ifdef

    TControlList β€” need help!

    That's why I chose the TControlList β€” it allows to instantly move to any place, all that remains is to fix the fixed row height πŸ™‚
  4. #ifdef

    TControlList β€” need help!

    THtmlViewer: https://i.ibb.co.com/XXX8pt9/image.gif TControlList: https://i.ibb.co.com/84bg3g1/1.gif
  5. #ifdef

    TControlList β€” need help!

    Yes, I'm sure THtmlViewer + 10000 (start is ~5 seconds, resize is slow): unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, System.Math, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, HTMLUn2, HtmlView; type TForm1 = class(TForm) HtmlViewer1: THtmlViewer; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} function setCaption: string; var Lt: string; Li, Ll: integer; begin Ll := RandomRange(10, 1000); Lt := ''; for Li := 1 to Ll do begin if (Random(10) = 0) and (Li < Ll) then begin Lt := Lt + ' '; end else begin if Random(2) = 0 then Lt := Lt + Chr(RandomRange(65, 90)) else Lt := Lt + Chr(RandomRange(97, 122)); end; end; Result := Lt; end; procedure TForm1.FormCreate(Sender: TObject); var Li: integer; Ls: string; begin for Li := 1 to 10000 do Ls := Ls + '<div>' + Li.ToString + ': ' + setCaption + '</div><br>'; HtmlViewer1.Text := Ls; end; end. TControlList + 10000 (start is ~1 second, resize is ok): unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, System.Math, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ControlList; type TForm1 = class(TForm) ControlList1: TControlList; Label1: TLabel; procedure FormCreate(Sender: TObject); procedure ControlList1BeforeDrawItem(AIndex: Integer; ACanvas: TCanvas; ARect: TRect; AState: TOwnerDrawState); private { Private declarations } public { Public declarations } end; var Form1: TForm1; FList: TStringList; implementation {$R *.dfm} function setCaption: string; var Lt: string; Li, Ll: integer; begin Ll := RandomRange(10, 1000); Lt := ''; for Li := 1 to Ll do begin if (Random(10) = 0) and (Li < Ll) then begin Lt := Lt + ' '; end else begin if Random(2) = 0 then Lt := Lt + Chr(RandomRange(65, 90)) else Lt := Lt + Chr(RandomRange(97, 122)); end; end; Result := Lt; end; procedure TForm1.ControlList1BeforeDrawItem(AIndex: Integer; ACanvas: TCanvas; ARect: TRect; AState: TOwnerDrawState); begin Label1.Caption := FList[AIndex]; end; procedure TForm1.FormCreate(Sender: TObject); begin FList := TStringList.Create; ControlList1.ItemCount := 10000; for var Li := 0 to ControlList1.ItemCount - 1 do FList.Add(Li.ToString + ': ' + setCaption); end; end.
  6. #ifdef

    TControlList β€” need help!

    It looks really good, but on older computers 1000+ lines are too slow to render when resizing the canvas β€” and I can’t use pagination because the entire list must be available. But thanks anyway!
  7. #ifdef

    TControlList β€” need help!

    https://github.com/NickeManarin/ScreenToGif/
  8. #ifdef

    TControlList β€” need help!

    No, I don't (anyway, TControlList is for TGraphicControl only). Yes.
  9. #ifdef

    TControlList β€” need help!

    Sorry, I don't need a text editor, I just need to somehow speed up the rendering of text with word splitting and that's it
  10. #ifdef

    TControlList β€” need help!

    Nope. TControlList if for TGraphicControl only:
  11. #ifdef

    TControlList β€” need help!

    I know but... in Notepad++ everything is ok πŸ₯²
  12. #ifdef

    TControlList β€” need help!

    πŸ₯²
  13. #ifdef

    TControlList β€” need help!

    You can try changing "100" to "1000" and change the size of the form after compilation
  14. #ifdef

    TControlList β€” need help!

    Thank you for your kind words, but no, I don’t think I succeeded, that's why I decided to contact you personally 😞 I have 11.3 CE (28.0.48361.3236), you are right, but it probably should look and work the same on 12.1: the problem occurs when the form changes size. What about the "FHeights" - it's just a temporary storage of row sizes (like a cache or something).
  15. #ifdef

    TControlList β€” need help!

    It's impossible to speed things up? 😞
Γ—