Edwin Yip
-
Content Count
430 -
Joined
-
Last visited
-
Days Won
3
Posts posted by Edwin Yip
-
-
Typo: In the attached screenshot, "I masked on this area..." should be "I masked only this area..."
-
Hi,
I wonder if anyone, especially @Alexander Sviridenkov can give me any advise as to solving the following ThtPanel (a control from delphihtmlcomponents.com) rendering issue (text overlapped) under win 10/11 (ok under win 7).
- The screenshot of the issue is attached.
- I'm using HCL 3.7 (not the latest, I know, but I'm afraid I need to solve this issue with this version at the moment).
- The html code used:
Trial Period's Expiring in 21 Day(s)<br />When in trial mode only <strong>20</strong> blabla.<br /><br /><a href="#buy">Buy MyProduct here</a><br /><br /><a href="#activate">Activate MyProduct</a> if you already have a license key
- The `ThtPanel` object:
var pnlMsg := THtPanel.Create(Self); pnlMsg.Parent := Self; pnlMsg.AlignWithMargins := True; pnlMsg.Hint := '[Ctrl + C] to copy the message to clipboard'; pnlMsg.Align := alClient; pnlMsg.Caption := 'pnlMsg'; pnlMsg.ParentBackground := False; pnlMsg.ParentColor := True; pnlMsg.ParentFont := False; pnlMsg.ParentShowHint := False; pnlMsg.PopupMenu := pmMsg; pnlMsg.ShowHint := True; pnlMsg.TabOrder := 1; pnlMsg.Styles.Clear; pnlMsg.Styles.Add('a {'); pnlMsg.Styles.Add(' color: #0088cc;'); pnlMsg.Styles.Add('}'); pnlMsg.TouchScroll := False; pnlMsg.VerticalScrollBar := hsbAuto; pnlMsg.HighlightTextColor := 0; pnlMsg.EnableSelection := True;
-
On 9/16/2022 at 6:31 PM, RDP1974 said:Wow, that's a 10x improvement! Not sure how it affects the performance of framework like mORMot @Arnaud Bouchez :)
-
8 hours ago, Clément said:FYI
CPsoftBE uploaded a fix in branch 'Limagito Patches' . Problem is solved!Do you mean this commit: https://github.com/CPsoftBE/BackupOfCromis/commit/0323cf3dbd25587fae592701581b8241ff07cebf
Strange, I couldn't see any file changes to the github repo...
-
Delphi is #7 in the loved languages ranking
-
Oh sorry, overlooked the MacOS requirement...
-
I use mORMot for this because calling a method or an interface in another process is just like calling a method/interface in the same process.
And the communication protocol can be tcp/ip or named pipes.
On process B you define and implement an interface:
type ICalculator = interface(IInvokable) ['{9A60C8ED-CEB2-4E09-87D4-4A16F496E5FE}'] /// add two signed 32-bit integers function Add(n1,n2: integer): integer; end; TServiceCalculator = class(TInterfacedObject, ICalculator) public function Add(n1,n2: integer): integer; end; function TServiceCalculator.Add(n1, n2: integer): integer; begin result := n1+n2; end;
And you expose it:
Server.ServiceRegister(TServiceCalculator,[TypeInfo(ICalculator)],sicShared);
On process A, you can now call the above interface served by process B:
Client.ServiceRegister([TypeInfo(ICalculator)],sicShared); var I: ICalculator; begin I := Client.Service<ICalculator>; if I<>nil then result := I.Add(10,20); end;
More details: https://synopse.info/files/html/Synopse mORMot Framework SAD 1.18.html#TITLE_415
Sample code:
https://github.com/synopse/mORMot/tree/master/SQLite3/Samples/14 - Interface based services
It's even simpler if you use the so-called "method-based service".
Hope it helps.
-
It seems that the copilot rest API has been available...
- 1
-
On 4/30/2022 at 3:38 AM, Darian Miller said:About as far as I got on that tool is forking it and translating all of the Chinese strings/comments into English using Google Translate
https://github.com/radprogrammer/htmlparser
Sounds cool!
-
Alexander's HCL is excellent and a set of gems, and definitely you can rely on it.
Others I've successfully used in the past:
https://github.com/ying32/htmlparser (open source, simple but does work depending on your needs).
and
DIHtmlParser (commercial, it's actually more of a tokenizer, but powerful)
-
On 4/20/2022 at 8:03 PM, Mike Torrettinni said:Did you try this component? I would be interested if it has faster implementation of search and highlight - faster than current TRichEdit.
I did compiled and run the demo, but I didn't look any further, so I'm not sure about the performance of search, etc...
-
18 minutes ago, Mike Torrettinni said:The link has some facebook details... if you wanna remove it.
Thanks for the heads up, Mike. I removed the fb details from the link in my post, however, it seems that your quoted reply still contains the details :D
-
Another open source Delphi project worth spreading - a pure Delphi implementation of a rich text editor, like TRichEdit, in BSD license.
But be aware - although the classes/methods/vars are well named in English, the comments and documents are in Chinese.
So feel free to ignore it if you mind that.
- 1
-
Hi @laes, thanks for your efforts! In case you didn't know, the CN Pack Delphi extension provides some advanced syntax highlighting: http://www.cnpack.org/images/cnwizards.gif
- 1
-
20 minutes ago, Angus Robertson said:It's unclear to me from the readme and help whether ZipMaster is a linkable Delphi component or a DLL with a Delphi interface.
The documentation seem to assume you are familiar with the component and not migrating from something like VCLZip.
Angus
- TZipMaster has a full set of features for writing/reading zip archives, most of the logics are implemented in Delphi, but it relies on a 300+KB DLL for the underlying operations.
- TZipMaster supports both 64bit and 32bit Delphi compilers.
- TZipMaster supports Zip64 (for zip files larger than 4GB).
I edited the readme.md file
-
Well, I didn't exactly make this, but DelphiZip should be the most feature-rich open source zip component for Delphi, and since 2019 due to a health issue Russell Peters the previous maintainer has stop the maintenance.
I fixed several minor issues for the library, but there is no place to submit my changes now (even delphizip.org is down), so I created a github repository and welcome anyone to contribute:
-
19 hours ago, Henry Olive said:Thank You so much Peter, Edwin
Edwin, exactly yes
I wrote below code ( Delphi 10.3) and everything is OK mouse wheel works
but to me, there should not need below code, mouse wheel should work
without any code.
procedure TMeetNote2.ScrollBox1MouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
var
aPos: SmallInt;
begin
aPos:= ScrollBox1.VertScrollBar.Position - WheelDelta div 10;
aPos:= Max(aPos, 0);
aPos:= Min(aPos, ScrollBox1.VertScrollBar.Range);
ScrollBox1.VertScrollBar.Position := aPos;
Handled := True;
end;Yes, you have to write such code, and such code only works if the scrollbox has the focus.
-
Do you want to scroll TScrollBox vertically with mouse wheel?
-
As I understand it, although it's being released on github, this project is not open source, right?
- 1
-
2 hours ago, David Heffernan said:Would be nice to know what's actually going on here, but all I can see is an opaque DLL which seems to have all the implementation in it.
I had the same curiosity and asked the author on facebook. It actually contains a modified version of Tiny C Compiler, but I didn't ask for implementation details.
That being said, the OP might can give us more details.
-
9 hours ago, Vincent Parrett said:Classic! I can certainly attest to this.. currently researching how to migrate away from confluence for our documentation site.
Will you share your final choice with us then? ;)
-
-
Well done sir!
BTW, what tool(s) do you use to measure the performance? Thanks.
-
Your hard work greatly improved the richness of drawing/painting/image-processing/animation abilities of Delphi! Thanks!
- 1
Text overlapped in Delphi Html Component Library
in Delphi Third-Party
Posted
Thanks for the help Alexander.
So I've just tried:
- THtCanvasGDI: I assume this the default so it has the issue.
- THtCanvasGP: Tried `HtDefaultCanvasClass := THtCanvasGP`, and it's the same issue.
- THtCanvasDX: `HtDefaultCanvasClass := THtCanvasDX` solves the issue!
And the html code is updated at runtime like this:
`pnlMsg.HTML.Text := aHtmlCode`
PS, I prefer `THtCanvasGDI` because the text rendering is the same as the system.