Category: Firemonkey

New Hands-on with Delphi book available now

I’m more than delighted to see today the first fruits of brainstorming and ideas that started here more than 6 months ago.


This first result is a new book, written by our chief evangelist Dr. Holger Flick. The book title is “Hands-on with Delphi” and on the side of the book you can see in a light blue rectangle the big number 1. This suggests there will be a number 2, and 3 and …

So, what did we brainstorm about? Over the timespan of 25 years, we have created a wide range of products, all focusing on a specific area. There are the VCL UI controls in TMS VCL UI Pack, there is the Flexcel product for sophisticated manipulation, generation of Excel & PDF files, there is our Aurelius ORM, our XData server, our cross-framework/cross-platform FNC components, our TMS WEB Core framework, … too much to name it all. Each product has its strengths and its documentation and samples focus on this one specific product.

But there is a bigger picture and that picture is what you are doing on a daily basis. Creating great software applications for users by bringing together the best components from our company as well as other 3rd party companies. There is one thing in common, that is of course: Delphi which is the central part, the IDE, the compiler, the frameworks that bind it all together.

And with this insight, the idea was born that it would bring additional value if more knowledge was transferred about how to bring all pieces of the puzzle together, how the different components, technologies, frameworks and tools can be brought together to create powerful & stunning applications that help people and organisations all over the world in many domains.

In this first book in the series, Holger already brings together a big stack of different products:

With the book come of course also the sample projects that were created using Delphi 10.3 Rio.

Head over to the book content description to see what you will learn with the book:

  • Write a professional web service for a database with over 8 million records.
  • Design VCL, FireMonkey and TMS WEB Core web clients for multiple platforms and devices.
  • Implement a reporting service with XData.
  • Generate signed PDF documents with a customizable template.
  • Add a token-based login to your services.
  • Build user interfaces with vector images to be ready for any display resolution.
  • Encrypt sensitive data using modern algorithms.
  • Use parallel programming to build responsive client applications.
  • Write better code with static code analysis.

The book can be ordered from today from Amazon:

Check the blog from our colleague Dr. Holger Flick where you can obtain also a sample chapter PDF.

And if that’s not enough, the content table for the 2nd book is already nearly done. We are eager to learn though what you want to see covered in books 3, 4, 5 …

Read More

Read More

Delphi 10.3.3 How to view pdf file on Ubuntu

My app downloads the file from the server and it saves the file in the default download directory. How can I open the file after downloading to view it. try MS := TMemoryStream.Create; try Http.Request.BasicAuthentication:= true; Http.Request.Username := '*****'; Http.Request.Password := '****'; Http.Get('http://'+serverIP+':8080/api/getpdf/'+fType, MS); MS.Position:=0; {$IFDEF MSWINDOWS} MS.SaveToFile(fl); {$ENDIF} {$IFDEF LINUX} MS.SaveToFile(fl); {$ENDIF} {$IFDEF ANDROID} if PermissionsService.IsPermissionGranted(JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE)) then begin MS.SaveToFile(fl); end; {$ENDIF} previewFile(fl,fType);<-------------- finally MS.Free; end; finally Http.Free; end; In windows platform I do: ShellExecute(0, 'open',PChar(fl),nil,nil,0) Any suggestion for Linux?
Read More

How to get the values of TListView selected item in Firemonkey Delphi Rio

I have a TListView populated with data from TFDQuery using Livebindings. I would like to get the values of the selected item like the item.text, itemheader.text, etc. I already figured out the selected item through listview1.itemindex but to get the values is a struggle to me. I am new with TListView and livebindings. I've spent over a day already looking for answers in the internet but looks too complicated for a very simple task. I know there is a straight method for this. Anyone care to share some clues (codes) on how to get the values of listview selected item? MORE DETAILS: I am using the Livebindings dynamic appearance. I created items for my query fields and map them accordingly to my TListView. It so happen that I did not use the default item.text but instead map fields to my created items like item.text1, item.text2, item.item3. Hence, this is the reason why I am not getting the caption from the formula given by MartynA below.
Read More

Open custom file type with my application under android [closed]

What I want: To be able to import my custom file by mail with my application from the preview button in GMail or when opening it in a file browser. I have added the intent-filter in the AndroidManifest.template.xml file: <intent-filter android:label="%activityLabel%"> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="file" android:pathPattern=".*\\.ksm" android:mimeType="application/*"/> <data android:scheme="content" android:pathPattern=".*\\.ksm" android:mimeType="application/*"/> </intent-filter> But when i click the file with extension ksm in "My Files" i reciev the message: Search the Play Store? You don't have any apps that can open this type of file. You can search for one in the Play Store.
Read More

How to move to Next Tab upon selection of an Item in TListView in Firemonkey Delphi

I have TabControl with 2 TabItems for my mobile device development. The TabItem1 has a TListView for list of items populated using LiveBindings. Here, the TabItem2 should provide the details of the selected item in TabItem1 — no issues here. My question is — How to trigger the move from TabItem1 to TabItem2, during item selection, using a set of code in the TabItem1.OnItemClick event?
Read More

TCellReturnAction::GotoNextRow on android

i am developing an application that starts under windows and android. I want In a StringGrid that is editable. that if the user press enter under windows or Done under android, the cursor jumps to the next grid line. I use in the oncreate event of Form. SGBestDetail->Model->CellReturnAction= TCellReturnAction::GotoNextRow; It runs fine under windows. It jumps to next grid row but under android it do nothing.
Read More

Delphi FMXLinux cannot find -lcurl

I cannot link an application using FMXLinux because the linker cannot find the curl library (Delphi 10.3.3): [DCC Error] E2597 C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\ld-linux.exe: error: cannot find -lcurl c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_global_init(int): error: undefined reference to 'curl_global_init' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_global_cleanup(): error: undefined reference to 'curl_global_cleanup' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_slist_append(curl_slist*, char*): error: undefined reference to 'curl_slist_append' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_slist_free_all(curl_slist*): error: undefined reference to 'curl_slist_free_all' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_strerror(CURLcode): error: undefined reference to 'curl_easy_strerror' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_init(): error: undefined reference to 'curl_easy_init' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_setopt(void*, CURLoption): error: undefined reference to 'curl_easy_setopt' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_perform(void*): error: undefined reference to 'curl_easy_perform' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_cleanup(void*): error: undefined reference to 'curl_easy_cleanup' c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_getinfo(void*, CURLINFO): error: undefined reference to 'curl_easy_getinfo' [DCC Fatal Error] F2588 Linker error code: 1 ($00000001) But on my ubuntu 19.10 system I can find the in the folder usr/lib/x86-64-linux-gnu and this folder is synced in my Delphi SDK folder at C:\Users\MyUser\Documents\Embarcadero\Studio\SDKs\ubuntu19.10.sdk\lib\x86_64-linux-gnu UPDATED: If I rename manually the library file to in the local ubuntu-SDK folder I can build my project. Do I need to install an older version of when using the delphi RTL library Linuxapi.Curl (e.g. used from System.Net.HttpClient.Linux)? Thank you for any hint!
Read More

May the Fourth (be with you) – and some FireMonkey feature requests

Happy Star Wars Day! What? Delphi programming types are allowed to be silly sometimes. :) This iconic 3D Model is used with permission from CoreyLoses. Corey created a full conversion mod of Sins of a Solar Empire called Star Wars: Thrawn's Revenge II: Ascendancy. If you like real time strategy games and have a soft spot for Star Wars, maybe take a look. Plus, Corey is a fellow Canadian,
Read More

Delphi RIO 10.3.1 FMX TListView ‘ItemClickEx’ fires 2 for single click

I'm trying to implement a 'toggle' function when clicking on a tlistview item. But when testing I notice that the click event get's fired 2 times with a single click / tap with IDENTICAL parameters.. I'm testing this for now on windows. Is this 'works as designed' ? I only added a listview to an empty form and implemented the 'ItemClickEx' event. I could not find a workaround way to my toggle..except implementing a timer that would keep track of the clicks and ignore a second click to soon... ( it seems the FMX framework also works with delayed events when looking at the stack trace ) I tested also the onitemclick event and this one DOES fire only once. .. so I could probably use it to implement simple workaround. But not nice, I need the 'ex' version as well as eventually, I need to add/delete items from my list which is recommended only from the 'ex' version, according to the documentation . Regards Dirk
Read More