firemonkey

Custom component controls keep re-creating

时光怂恿深爱的人放手 提交于 2019-12-01 23:52:01
I'm a newbie in Firemonkey/custom controls so sorry if this is a banal question or a duplicate one but I'm stuck and can't figure it out. Here's the code of my custom control unit swScheduler; interface uses System.SysUtils, System.Classes, FMX.Types, FMX.Controls, FMX.StdCtrls, FMX.Calendar, FMX.Objects; type TswScheduler = class(TControl) private { Private declarations } paLaterale: TPanel; clCalendario: TCalendar; paLibero: TPanel; paScheduler: TPanel; rcSCTop: TRectangle; protected { Protected declarations } public { Public declarations } constructor Create( AOwner: TComponent ); override;

Change Alternating Colors in Firemonkey TListView

孤者浪人 提交于 2019-12-01 23:41:58
问题 Dropping a tlistview onto a form and checking the property 'AlternatingColors' to true, by default it will show a grey background on every other item on the listview. My question is does anyone now how to change this color to something else? Thanks, 回答1: You need to edit the style of TlistView. Right-click on listview, choose "Edit Custom Style" and in the structure panel there are two items: "itembackground" and "alternatinfitembackground". You can change the colors from there. 来源: https:/

How to crop an FMX TBitmap

一世执手 提交于 2019-12-01 23:04:05
I receive a bitmap via TCameraComponent.SampleBufferReady event. Then I need to crop the received image so that I get a, for instance, recangular image. I calculate the necessary parameters in the following method: procedure TPersonalF.SampleBufferReady(Sender: TObject; const ATime: TMediaTime); var BMP: TBitmap; X, Y, W, H: Word; begin Try BMP := TBitmap.Create; CameraComponent.SampleBufferToBitmap(BMP, true); if BMP.Width >= BMP.Height then //landscape begin W:=BMP.Height; H:=W; Y:=0; X:=trunc((BMP.Width-BMP.Height)/2); end else //portrait begin W:=BMP.Width; H:=W; X:=0; Y:=trunc((BMP.Height

Incorrect selection of items in an FMX TListbox (Grid Metropolis UI)

末鹿安然 提交于 2019-12-01 23:01:01
I have met an issue of unproper selection of items in TListBox in my application with a HorzScrollBox in the form. The form has two (or more) TListBox on it. They are placed away from each other so that their absolute left coordinates difference is more than the width of the current device screen width. The error appears in the following sequence of user actions. An item is selected from the left TListBox The HorzScrollBox is scrolled to the right and the second TListBox becomes visible to user and the left one - invisible. The HorzScrollBox is scrolled back to the left. An new item is

Firemonkey & Android 64-bit requirement

家住魔仙堡 提交于 2019-12-01 21:36:57
问题 Starting August 1, 2019: All new apps and app updates that include native code are required to provide 64-bit versions in addition to 32-bit versions when publishing to Google Play. How in a Firemonkey application, can I set app to meet 64-bit requirements? I'm using Embarcadero RAD Studio 10.3. 回答1: It's impossible to compile a 64bit Android app with RAD Studio 10.3. Android 64bit support is only coming in RAD Studio 10.3.3 as can be seen from the latest August 2019 Roadmap. So you'll need

Validating XML files against XSD in FireMonkey

江枫思渺然 提交于 2019-12-01 18:33:49
I am developing a cross-platform application (for Windows, Mac etc.) and for 32-bit and 64-bit machines. I have lots of XML files which I need to validate against their XSD . Is there any way of doing this in Delphi XE3? I have tried DTD validation but I'm always getting a "DTD prohibited" error. I have also tried solutions mentioned on lots of websites to resolve this error, but I've had no success. Thanks in advance. Below is the code I've used... function TForm2.ValidateXML(const xmlFile : TFileName) : boolean; var xmlDoc: TXMLDocument; begin result := false; xmlDoc := TXMLDocument.Create

Passwords and Delphi TZipFile

风流意气都作罢 提交于 2019-12-01 17:15:44
Is Delphi XE5 TZipFile able to handle encrypted/password protected zip files? Or must users use third party software to handle this? Any help would be appreciated. Looking at the source code for System.Zip , I see no indication of anything that would allow working with encrypted Zip files. There is no provision for specifying a password for either zipping or extracting files or creating a Zip archive. You could always include support for encrypted archives using Turbo Power Abbrevia , open-sourced several years ago by Turbo Power. It's been updated to support XE5, according to the SVN

Passwords and Delphi TZipFile

五迷三道 提交于 2019-12-01 17:09:24
问题 Is Delphi XE5 TZipFile able to handle encrypted/password protected zip files? Or must users use third party software to handle this? Any help would be appreciated. 回答1: Looking at the source code for System.Zip , I see no indication of anything that would allow working with encrypted Zip files. There is no provision for specifying a password for either zipping or extracting files or creating a Zip archive. You could always include support for encrypted archives using Turbo Power Abbrevia,

How to make a single component support both VCL and FMX?

狂风中的少年 提交于 2019-12-01 16:14:39
I have a TComponent which controls some of the UI. This component is designed to support both VCL and Firemonkey by using conditionals. Such conditionals instruct my component whether to accept a VCL control or an FMX control. It's currently expected that this conditional is defined on the application level to instruct the component in run-time whether it's to manage a VCL or FMX control. I'd like to publish my component into the IDE with support for both VCL and FMX, sharing the same unit with conditionals. However, depending on whether VCL or FMX is currently in use, the property names/types

Firemonkey: can we update targetSdkVersion in AndroidManifest.template.xml?

感情迁移 提交于 2019-12-01 14:42:15
I read that berlin is compatible with marshmallow, but i see that by default in the AndroidManifest.template.xml we have : <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="%targetSdkVersion%" /> i don't know where delphi took the variable to update %targetSdkVersion% but it's seam to be all the time 14 and i don't see any way to configure it i would like to replace %targetSdkVersion% by 23 (marshmallow api level, to support the app permissions), but is it safe to do so or it's will introduce many other bug ? FireMonkey was developed to work against a certain range of