Category: Firemonkey

conflict with events click and gestures – delphi firemonkey

My application has a TImage with two events, a left or right gesture event to change the image and a TImage click event to zoom the image, but when using the left or right gesture to change the image, the problem occurs, the click of the event is triggered and the zoom is called ... How to solve this? Sorry for my english .. I'm Brazilian
Read More

The TMSFMXWebGMaps is causing to freeze or make my app not responding

I am developing a firemonkey app using Google Map. When I dropped the TMSFMXWebGMaps component and tried to run it. it just freeze forever and not responding. I do not know what I was missing here and have no clue yet. Is there any other TMS components that I should be installing or configuration that I missed here? UPDATE 1 — DELETED THE RME I entered the APIKey in the properties and it works in my RME which I just deleted in this update to avoid confusion. But, when I tried in in my actual development by dropping the TMSFMXWebGMaps componet. It is not responding and cause to freeze when running it.
Read More

tmssoftware.com and FaunaDB announce partnership to work on cloud database backed applications

We are excited to announce that tmssoftware.com & FaunaDB entered a partnership and as a first result, TMS WEB Core v1.4 features out-of-box support for FaunaDB.

TMS WEB Core focuses on high productivity RAD component-based web client application development for Object Pascal developers and FaunaDB focuses on effortless serverless data access. Together, this offers a powerful combination for creating fast, secure web applications backed by the data correctness, capacity, redundancy, latency, and availability of FaunaDB.

Now, creating a web application dealing with user data is nothing more than creating an account at FaunaDB, creating a new database with data collections you want, define your queries and get an API key.

In the TMS WEB Core web client application, drop a TWebFaunaDBClientDataSet on the form, specify the CollectionName (table name), ClientKey (API-key) & persisted DB fields. Activate this dataset and all DB-aware UI controls connected via a TWebDataSource to this TWebFaunaDBClientDataSet will work directly on the FaunaDB data.

TMS WEB Core in Embarcadero RAD Studio, using the TWebFaunaDBClientDataSet dataset for a seamless connection to data on FaunaDB

The TWebFaunaDBClientDataSet has been designed to also work seamlessly in multi-user/multi-account scenarios. Therefore, at TWebFaunaDBClientDataSet level, a UserCollectionName can be set and a user login and signup function is integrated at dataset level.

It is clear that the combination of web front-end development with TMS WEB Core with data in the backend managed by the serverless FaunaDB service offers an unparalleled combination to develop and deliver secure, reliable, high performant web-based applications fast.

Our chief evangelist Dr. Holger Flick explains all in detail in a special video about this:

You can now explore this first result of our partnership by downloading TMS WEB Core v1.4 from https://www.tmssoftware.com/site/tmswebcore.asp and create a FaunaDB account at https://www.fauna.com.

Bruno Fierens

CEO

tmssoftware.com
sales@tmssoftware.com
Joe Volat
PR
FaunaDB
press@fauna.com
Twitter: @fauna
Community: https://community.fauna.com

Read More

Read More

Delphi/FMX: How to add a dynamically created top-aligned component under all previously added top-aligned components, instead of second from the top?

I am making an app for Android with Delphi and FMX. In the onclick-procedure of a button I dynamically create a TPanel (with some components in it) which I then add to a TVertScrollBox. I want the TPanels to stack on top of each other, so I set the Align property to Top. procedure TMainForm.AddGroupButtonClick(Sender: TObject); var Group : TPanel; begin Group := TPanel.Create(Self); Group.Parent := Groups; // where Groups is a TVertScrollBox on the form Group.Align := TAlignLayout.Top; //Then I create some other components and set their Parent to Group end; A user would probably expect the new TPanel to be added under all the other TPanels. However, unless there's no TPanels added previously, every new TPanel is added directly under the topmost one, i.e. second from the top. Why is this and how do I add the new TPanel under all the previously added ones? I saw a similar question on here, but they were using VCL, where there apparently is a Top-property you can change. There doesn't seem to be one when working with FMX components though.
Read More

Instructions for working with the TGrid component from the FireMonkey library

I’m trying to find some instructions for working with the TGrid component from the FireMonkey library. All I found were two sentences from the documentation. http://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Grid.TGrid But this is too little. Does anyone know any other links to the description of this component? I can’t even understand, TGrid is a Data-aware or not a Data-aware component.
Read More

how to make all cells readonly in TMSFMXGrid (in Firemonkey)?

I am using Embarcadero® RAD Studio 10 Seattle Version 23.0.20618.2753 To make column read-only I used Grid_All_Party.Columns[2].ReadOnly := True; and to make cell read-only I used Grid_All_Party.ReadOnlys[1,0] := True; but how to make all cells of grid read-only without using the below code personally for all columns. Grid_Name.Columns[column_number].ReadOnly := True;
Read More

How do I get Mobile Numbers using Delphi FMX Address Book component

Delphi 10.3. Cross platform application. Android & IOS. I am using the TAddressbook component and the following code adapted from the Delphi code examples. I am able to get the names and photos but cannot workout the syntax for the phone numbers. The code fills the Listview with firstname / surname & image but the Contact.Phones seems to be an array. I found this in the documentation Phones.AddPhone(TContactPhone.TLabelKind.Mobile, '+33-6-46-51-3531'); So I need somthing like this Phones.Extract(TContactPhone.TLabelKind.Mobile); // Does not work. procedure TformMain.FillContactList(Source: TAddressBookSource); var I: Integer; Contacts: TAddressBookContacts; begin Contacts := TAddressBookContacts.Create; try AddressBook1.AllContacts(Source, Contacts); ListViewContacts.BeginUpdate; try ListViewContacts.Items.Clear; for I := 0 to Contacts.Count - 1 do AddListViewItem(Contacts.Items[I]); //AddListViewItem(Contacts.Items[I].Phones[0].Number) finally ListViewContacts.EndUpdate; end; finally Contacts.Free; end; end; procedure TformMain.AddListViewItem(Contact: TAddressBookContact); var ListViewItem: TListViewItem; eMails: TContactEmails; phones: TContactPhones; c : TAddressBookContact; begin phones := Contact.Phones; if Contact.DisplayName.Length > 0 then begin ListViewItem := ListViewContacts.Items.Add; try // ListViewItem.Data['Text2'] := Contact.Phones.Extract(TContactPhone.SupportedLabelKinds('Mobile')); // ListViewItem.Data['Text2'] := Phones.ExtractItem.LabelText. (TContactPhone.TLabelKind.Mobile, '+33-6-46-51-3531'); //ListViewItem.Data['Text2'] := Phones.ex ExtractItem AddPhone(TContactPhone.TLabelKind.Mobile, '+33-6-46-51-3531'); ListViewItem.Data['Text1'] := Contact.DisplayName; ListViewItem.Data['Text2'] := '07446944654'; // from sample eMails.AddEmail(TContactEmail.TLabelKind.Work, edtWorkMail.Text); // TLabelKind = (Custom, Home, Mobile, Work, iPhone, FaxWork, FaxHome, FaxOther, Pager, Other, Callback, Car, CompanyMain,ISDN, Main, Radio, Telex, TTYTDD, WorkMobile, WorkPager, Assistant); // ListViewItem.Data['Text2'] := c.Phones.First.LabelKind.Mobile.t;// Phones.IndexOf('Mobile'); // ListViewItem.Data['Text2'] := Contact.Phones.ExtractItem('Mobile'); // ListViewItem.Data['Text2'] := Contact.Phones.Extract.LabelKind('Mobile'); // ListViewItem.Data['Text2'] := Contact.Phones.ExtractAt.LabelKind.Mobile;//('Mobile'); // phones := Contact.Phones.ExtractItem.LabelKind.Mobile; //.TLabelKind.Mobile;// .Phones.Extract(Mobile); // ListViewItem.Data['Text2'] := phones.ExtractAt.LabelKind.Mobile;// Extract.LabelKind.Mobile;// ExtractItem.LabelKind.Mobile;// Contact.Phones.Extract('Mobile').ToString;// Phones.Extract.TLabelKind.; // ListViewItem.Data['Text2'] := phones.Extract.LabelKind.Mobile;// Contact.Phones Items[0].TLabelKind. .Number;// .Items[0]; ListViewItem.Data['Image3'] := Contact.PhotoThumbnail; ListViewItem.Tag := Contact.ID; finally ListViewItem.Free; end; end; end;
Read More

Coming up: style your components with FNC styles!

Look and Feel

A major part of your application is the look and feel. It can take up a lot of resources and time to make your application stand out, make it attractive, a feast for the eyes. When eating dinner, you also want your plate to look nice, because it makes it more appealing, and yells: “Eat me!”. Of course, your application needs to function properly, but don’t we all want to have a nice looking user interface?

Coming around the corner are FNC styles, that will help you achieve a slick user interface!

FNC Styles

FNC Styles is designed to provide you with 2 ways to style your application.

  • Built-in styles
  • Custom styles

In the first version of FNC Styles the built-in styles will be: Dark, Light, Office 2019 Black, Office 2019 Gray and Office 2019 White.

Custom styles will be configurable through the style manager, based on the default or built-in styles.

The style manager (also available as a separate component), will provide you with an easy way to load styles at designtime & runtime, and the possibility to combine multiple individual component styles to one style, that you can apply to all your forms. At designtime and runtime, the built-in styles are available through a resource.

JSON based

The style mechanism is based on the persistence interfaces that already exist in FNC. It will generate a JSON that only contains the necessary information based on the components appearance properties. The detection happens automatically, but finetuning can be done with the IsAppearanceProperty virtual. Some components needs to save more information than others. Even custom components that you have designed will be styleable through the ITMSFNCPersistence interface, when inheriting from TTMSFNCCustomControl.

{
   "$type":"TTMSFNCCalendar",
   "Color":"#484848",
   "DateAppearance":{
      "$type":"TTMSFNCCalendarDateAppearance",
      "BadgeFill":{
         "$type":"TTMSFNCGraphicsFill",
         "Color":"#FF0000",
         "ColorMirror":"gcNull",
         "ColorMirrorTo":"gcNull",
         "ColorTo":"#808080",
         "Kind":1,
         "OnChanged":null,
         "Opacity":1,
         "Orientation":1,
         "Texture":"",
         "TextureMode":2
      },
      "BadgeFont":{
         "$type":"TTMSFNCGraphicsFont",
         "Color":"#FFFFFF",
         "Family":"Segoe UI",
         "Name":"Segoe UI",
         "OnChanged":null,
         "Size":10,
         "IsFMX":true,
         "Style":0
      },
      "BadgeStroke":{
         "$type":"TTMSFNCGraphicsStroke",
         "Color":"#FF0000",
         "Kind":1,
         "OnChanged":null,
         "Opacity":1,
         "Width":1
      },
      "DateAfterFill":{
         "$type":"TTMSFNCGraphicsFill",
         "Color":"#484848",
...

Create your own style!

When the new FNC style mechanism is released, it will allow you to use the built-in styles or create and apply a custom style to your application. Feel free to share the style you have created, we can even include it as a built-in style. Stay tuned, FNC Styles is around the corner and will be available real soon!

Read More

Read More