BlogAll Blog Posts | Next Post | Previous Post
Wednesday, November 24, 2021
Thanks to the use of components on a visual form designer, Delphi was a pioneer in no-code long before the term started to be used. As our primary job is to develop components, the way our components are architected is instrumental in getting as close to no-code as possible. Many times it is rather low-code than no-code, but now and then, we can assemble the components in such way that a functional application can be created without writing a line of code. Today we have a look at the newest TMS FNC WX Pack release with the new TTMSFNCWXPDFThumbnailList and TTMSFNCWXPDFToolbar that facilitate to create a functional PDF viewer app for 4 frameworks and a myriad of different operating systems without writing a single line of code.
The PDF viewer app
The TTMSFNCWXPDFToolbar purpose is to allow navigation in a PDF that is opened to view. It contains buttons for going to the next/previous/last/first page, to open a new PDF file or to rotate pages or zoom in & out pages.
The TTMSFNCWXPDFThumbnailList is, as the name implies, an either vertically or horizontally scrolling list of thumbnails of pages in the opened PDF file. It interacts with the TTMSFNCWXPDFViewer component to show the clicked page in the thumbnail list.
So, to build this application, following steps are needed:
1) Drop TTMSFNCWXPDFToolbar on the form and set alignment to top
2) Drop TTMSFNCWXPDFThumbnailList on the form and set alignment to left
3) Drop TTMSFNCWXPDFViewer on the form and set alignment to client
4) Assign the TMSFNCWXPDFViewer1 to TTMSFNCWXPDFThumbnailList.Viewer
5) Assign the TMSFNCWXPDFViewer1 to TTMSFNCWXPDFToolbar.Viewer
Ok, sorry, there is nothing more to do. Compile and run the app. Click the open file button in the toolbar, select a PDF file from the local file system and it will be loaded. This means, the toolbar will get active and will allow you to browse through the PDF file and the thumbnaillist will be loaded with thumbnails of all pages in the PDF. Click a thumbnail in this list and this page will be displayed in the viewer.
Just to avoid confusion, these steps can be performed for a VCL Windows application. But the same steps apply for a FireMonkey application that can target Windows, macOS, Linux, iOS and Android. And it does not stop there, you can do exactly the same after creating a new TMS WEB Core web client application, a TMS WEB Core Miletus cross platform desktop application or a TMS WEB Core PWA, including doing this both from the Delphi IDE or from the Visual Studio Code IDE. And finally, also from the free Lazarus IDE, it can be done from Windows, macOS, Linux.
In Delphi, no-code is not a prison
The power of Object Pascal component based development is that it isn't limited to no-code or low-code, it is just a start. Where there are a lot of possibilities to create a lot of useful end-user functionality with little to no-code, Delphi still allows to go "down to the metal" and write code that can use every corner of the operating system (and that includes the web browser as operating system when a web client application is created). The WX components contain numerous properties, event handlers and public methods that allow to further programmatically manipulate the components.
It's clear that going forward, we continue to do a lot of R&D to bring as no-code components as possible. We are very curious what more possibilities you see in the context of WX controls for bringing new solutions. Use our various communication channels to chime-in and let us know your ideas
This blog post has received 2 comments.
All Blog Posts | Next Post | Previous Post