-
Content Count
57 -
Joined
-
Last visited
-
Days Won
1
Everything posted by #ifdef
-
Is there any way/API to get a clipboard history (Win + V)?
-
I can't believe they did it π₯²
-
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
-
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 π
-
THtmlViewer: https://i.ibb.co.com/XXX8pt9/image.gif TControlList: https://i.ibb.co.com/84bg3g1/1.gif
-
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.
-
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!
-
https://github.com/NickeManarin/ScreenToGif/
-
No, I don't (anyway, TControlList is for TGraphicControl only). Yes.
-
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
-
Nope. TControlList if for TGraphicControl only:
-
I know but... in Notepad++ everything is ok π₯²
-
You can try changing "100" to "1000" and change the size of the form after compilation
-
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).
-
It's impossible to speed things up? π
-
The big problem with all these "containers" is that they don't work with the Tab button :(
-
Sorry, can't find your main topic here, so here is another GUI control pack for Delphi/Lazarus: https://github.com/Alexey-T/ATFlatControls
-
It looks like there is no way to do this π
-
High-level interface-based encapsulation of Direct2D Svg functionality
#ifdef replied to pyscripter's topic in Windows API
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))) -
High-level interface-based encapsulation of Direct2D Svg functionality
#ifdef replied to pyscripter's topic in Windows API
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 -
WebUI framework: Technical preview. Part 1.
#ifdef replied to Alexander Sviridenkov's topic in I made this
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 π -
Need to create a simple app for KaiOS (like WhatsApp has already done) β is it possible to do this in Delphi?
-
Product: Delphi Parser - AI claims - what does it mean?
#ifdef replied to Jasonjac2's topic in Delphi Third-Party
-
https://github.com/Embarcadero/RADStudio12Demos/blob/main/Object Pascal/RTL/HttpAsyncDownload/FDownloadDemo.pas#L70