Jump to content

Edwin Yip

Members
  • Content Count

    435
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Edwin Yip


  1. Sorry, but I'm able to help as I don't use it, but may I start a small not-so-off-topic discussion?

    When I first read from your post that winsoft has a WebView2 wrapper which supports old version of Delphi, I was exciting, thought that old Delphi can finally have the "TEdgeBrowser" component introduced in newer Delphi.

    Than I realized that in order to use it, the client PC would have to download a 123 MB WebView2 runtime!

     

    Oh, in that case, I think I'll keep using our good old Cef4Delphi...

     

    I'm puzzled, it seems that TEdgeBrowser also request that 120+ MB WebView2 run-time. I mean, why bother? Why not just use cef4delphi which provides you much more power and flexibility? This is a genuine question.


  2. 1 hour ago, Achim Kalwa said:

    Any special alignments of panels and buttons (Bottom, Right)?

    Can you provide a sample project?

    Yes, the bottom-most panel is alClient, on the second level are a list of row-panels with alTop, and on the third level one is alLeft and another is alClient.

     

    I'll try to get a reproducible sample later after the more important tasks are done... Thanks for your concern.


  3. Hi all,

     

    I've just encountered an issue that's quite strange and it took me hours to figure out but still couldn't confirm where dose it come from.

     

    The situation I found is like this:

    Let's say we have a VCL program with DPI-aware enabled (with xml manifest correctly set, all forms have `Scaled` set to true and working), and the form inheritance is like this:

    TFormC inherits from TFormB which in turn inherits from TFormA, which have some buttons on some panels.

     

    I found that, when running on a computer with different system DPI, TFormA will be auto scaled for 1 time and it's correct.

    But TFormB will be wrongly scaled and shifted twice, while TFormC will be scaled and shifted for 3 times.

     

    All other forms, even with form inheritance, but since there is no controls on the parent forms, the auto-scaling works.

     

    I'm not sure if it's related to my Delphi version and I use XE4, I wonder anyone can confirm if the issue comes from form inheritance? 


  4. With my very limited knowledge in this area (in the information collecting stage for a possible future project), ActiveX solutions aside, AFAIK, there is only one free option - use the low-level API of PdfiumLib, but I'm not sure if there is any Delphi sample code.

     

    If you can wait, ImageEn developer is planning to add such annotation feature to that lib (with has a PDF viewer already).


  5. 1 hour ago, Alexander Sviridenkov said:

    There is CSS contenteditable property which can be set to true or false using snandard CSS rules.

    Great!

     

    Quote

    Deleting of certain tags cannot be prohibited, but editor supports XML schema which can define rules for adding new tags (what tags are allowed and what tag can be added to another tag).

    Pity. Can't the editor provide events like `OnBeforeDeleteElement`, `OnBeforeEditElement`, and so on?


  6. @darnocian, according to the documents, since custom function for the template must be defined as static class methods, how do I access contextual data in those utility methods?

     

    I can see you can use `class var` to pass contextual data to the utility class before calling `Template.Eval`, but in case of multi-threaded template rendering, it seems that locking is unnecessarily needed. But at least it's workable? I'll try but you might have a better answer? Thanks.

     

    It'll be great if ITemplateFunctions.AddFunctions supports non-class methods, so that in the methods the object's fields are accessible.


  7. 16 minutes ago, darnocian said:

    Yes, you can do something like the following:

    
    begin
      var ctx := Template.Context;
      ctx.StartToken := '{{';
      ctx.EndToken := '}}';
      Assert.IsEqual('hello', Template.Eval(ctx, '{{ if true }}hello{{else}}bye{{end}}'));
    end;

     

    Oh, I think you misunderstood - what I mean is that you can customize the html code generated by `RenderMenu` by allowing the passing to it the `<li>` tags to use, for example, use `<li class="levelItem">`


  8. 1 hour ago, Xequte said:

    Editing of annotations via PDFium is on the to-do list.

    This is a great news!!!!

     

    Quote

    If you are looking to generate PDF files only (i.e. not edit existing PDF files) then ImageEn's native PDF support (creating and saving) can be used in threads.

    Can you point us to the specific page on your site that describes this feature in detail? Thanks.

     

×