Jump to content

#ifdef

Members
  • Content Count

    56
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by #ifdef

  1. #ifdef

    Delphi 12 is available

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

    TControlList β€” need help!

    I added dynamic (variable) row heights to TControlList and it works: But when resizing the form, the TControlList is terribly slow. @Serge_G I know you are a guru in this list. Please tell me how this can be fixed? Project1.zip
  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? 😞
  16. #ifdef

    FMX in VCL app - working natively ?

    The big problem with all these "containers" is that they don't work with the Tab button :(
  17. #ifdef

    Fr0sT.Brutal OSMMap : address instead of coordinates?

    Sorry, can't find your main topic here, so here is another GUI control pack for Delphi/Lazarus: https://github.com/Alexey-T/ATFlatControls
  18. #ifdef

    Prompting user to update a Windows Store app

    It looks like there is no way to do this 😞
  19. Thank you, the question is cancelled, I did everything yesterday and moved on) RT.Clear(D2D1ColorF(0, 0, 0, 0)); //procedure TD2DSVG.PaintTo(DC: HDC; R: TRectF; KeepAspectRatio: Boolean); + Image1.Transparent := true; It's ugly but that's all I need for my tests)))
  20. Hi there! Many thanks for your "Svg"! πŸ”₯ Could you please help me: is it possible to make the canvas transparent? I don't understand how to make it 😞 SVG.zip
  21. #ifdef

    WebUI framework: Technical preview. Part 1.

    Need to create a simple app for KaiOS (like WhatsApp has already done) β€” is it possible to do this in Delphi with WebUI? I don't know web at all 😞
  22. #ifdef

    KaiOS

    Need to create a simple app for KaiOS (like WhatsApp has already done) β€” is it possible to do this in Delphi?
  23. #ifdef

    Firemonkey app and SSL.

    https://github.com/Embarcadero/RADStudio12Demos/blob/main/Object Pascal/RTL/HttpAsyncDownload/FDownloadDemo.pas#L70
  24. #ifdef

    Memo and html

    + https://github.com/digao-dalpiaz/DzHTMLText
Γ—