firemonkey

About TidHttp, mshtml, ActiveX, COMObj in Firemonkey (Delphi)

梦想与她 提交于 2019-12-02 05:02:10
I was reviewing the following interesting article, "Extract Links from HTML page using Delphi" , and I tested in Firemonkey and it's very useful, however this code uses objects from Mshtml, ActiveX, and COMObj, so my questions are: do those objects above make less cross-platform for a Firemonkey project? if so, How could I get the same functionality using resources targeted for Firemonkey platform? How I can emulate a little webbrowser in firemonkey? Thanks in advance. Note : ChromiumEmbedded object does't work for Firemonkey. Ken White MSHTML , ActiveX , and ComObj are all Windows-specific,

Loading a custom True Type font

青春壹個敷衍的年華 提交于 2019-12-02 04:35:29
In a Mac Firemonkey app (Delphi XE7) how do I load my custom TrueType font? For Windows, my app's installer adds my font to Windows itself. I have done this with FPC/Lazarus, but not with Delphi so far. You only need to do two things (it works even if you have multiple custom fonts): 1) Add the custom font location to info.plist (it refers to the Resources folder): <key>ATSApplicationFontsPath</key> <string>Fonts</string> 2) Add the font(s) to the application bundle in the specified location: \Contents\Resources\Fonts Translating these two tasks to Delphi XE7, it will be: 1) Go to Project

Delphi FMX Android app. How to open SMS window

倖福魔咒の 提交于 2019-12-02 03:29:38
How I can open Short Message Service (SMS) window on Android phode with pretyped message text and recipient number. In manuals i found only Phone dialer PhoneDialerService.Call(edtTelephoneNumber.Text) which allow make call, but nothing about sending SMS messages. Germán Estévez -Neftalí- See the class SMSManager on Android API. There is a sendTextMessage method that you can use: Try some code like this: uses Androidapi.Helpers, Androidapi.JNI.JavaTypes, Androidapi.JNI.Telephony; procedure TForm1.Button1Click(Sender: TObject); var destAdress: JString; smsManager: JSmsManager; begin smsManager

How can I disable interpolation on a GPU canvas FMX TImage or set interpolation to “nearest neighbor”

强颜欢笑 提交于 2019-12-02 03:25:31
问题 I am trying to create a pinch-to-zoom TImage function and want to disable interpolation when resizing a firemonkey TImage control (and it needs to work across multiple devices). Setting the TImage's "DisableInterpolation" to "True" doesn't work on Windows if "GlobalUseGPUCanvas" is set to "True" or on Android (which I believe always uses a GPU canvas). This is easily reproducible with Embarcadero's Image Zoom sample by setting "GlobalUseGPUCanvas" to "True" in the project's DPR file and

Custom component controls keep re-creating

孤街浪徒 提交于 2019-12-02 03:13:00
问题 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 {

How to avoid TDateTime Data Rounding

核能气质少年 提交于 2019-12-02 02:49:20
问题 I am writing column and cell classes for FMX TGrid that will contain TCalendarEdit and TTimeEdit instances in every cell. Everything works fine except the proper processing of changes done in these child controls. type TFMTValue<T> = record FieldValue: T; Modified: boolean; Appended: boolean; Deleted: boolean; end; TDateTimeCell = class(TStyledControl) private FDate_Time: TFMTValue<TDateTime>; procedure SetDateTime(const Value: TFMTValue<TDateTime>); function GetDateTime: TFMTValue<TDateTime>

Add a TCombobox Column to a Firemonkey TGrid

风格不统一 提交于 2019-12-02 02:34:48
问题 This question appears to have been answered already, possibly by MonkeyStyler/Mike Sutton, however, as I am using Delphi 10 Seattle, provided code and guides don't work anymore. Specifically firemonkey grid basics doesn't work because the ApplyStyling event handler is only called once now (at column create) I want to add a TCombobox or TComboboxEdit column to aTGrid. type TComboColumn = Class(TColumn) protected function CreateCellControl: TStyledControl; override; // works! End; ... Grid1

FireMonkey Form in a dll, loaded from a VCL Application

两盒软妹~` 提交于 2019-12-02 01:59:21
I am attempting to load an FMX based dll, which includes an FMX form, from a VCL application which includes a VCL form. Taken from Release Notes - http://docwiki.embarcadero.com/RADStudio/en/Release_Notes_for_XE2_Update_2 : To create a DLL that uses GDI+, you need to start up GDI+ from your host application instead, as follows: For Delphi, add Winapi.GDIPOBJ to the interface section uses clause of your main form unit. Sounds all well and good, but in practice I am now getting an access violation on exiting my VCL application. I believe this is all linked to Initializing and Freeing the GDI+

How to avoid TDateTime Data Rounding

非 Y 不嫁゛ 提交于 2019-12-02 01:16:40
I am writing column and cell classes for FMX TGrid that will contain TCalendarEdit and TTimeEdit instances in every cell. Everything works fine except the proper processing of changes done in these child controls. type TFMTValue<T> = record FieldValue: T; Modified: boolean; Appended: boolean; Deleted: boolean; end; TDateTimeCell = class(TStyledControl) private FDate_Time: TFMTValue<TDateTime>; procedure SetDateTime(const Value: TFMTValue<TDateTime>); function GetDateTime: TFMTValue<TDateTime>; protected procedure SetData(const Value: TValue); override; public property Date_Time: TFMTValue

How can I disable interpolation on a GPU canvas FMX TImage or set interpolation to “nearest neighbor”

五迷三道 提交于 2019-12-02 00:59:39
I am trying to create a pinch-to-zoom TImage function and want to disable interpolation when resizing a firemonkey TImage control (and it needs to work across multiple devices). Setting the TImage's "DisableInterpolation" to "True" doesn't work on Windows if "GlobalUseGPUCanvas" is set to "True" or on Android (which I believe always uses a GPU canvas). This is easily reproducible with Embarcadero's Image Zoom sample by setting "GlobalUseGPUCanvas" to "True" in the project's DPR file and checking "DisableInterpolation" on the form's TImage: http://docwiki.embarcadero.com/CodeExamples/Tokyo/en