firemonkey

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

眉间皱痕 提交于 2019-12-02 10:09:36
问题 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

Loading a custom True Type font

只谈情不闲聊 提交于 2019-12-02 10:08:05
问题 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. 回答1: 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

Install font in firemonkey

此生再无相见时 提交于 2019-12-02 10:00:25
How Can I use embedded font or install new fonts in my firemonkey application? I tried this solution but WM_FONTCHANGE is not defined in FMX! I want to use custom font in my application, how I can do this? I followed the instructions here, and they were of some help. I have a few extra hints that may help, The two inclusions that you will need to make this work is WinAPI.Windows and WinAPI.Messages. If you put these inclusions at the start of your "uses" clause, you're unlikely to have name conflicts with things like TBitmap. Now, I've adding the following code, procedure TMainForm.FormCreate

Deleting an FMXobject inside its event handler

半城伤御伤魂 提交于 2019-12-02 08:17:16
I have the following components, tncrdragdata ( tframedscrollbox ) tdragdata ( tgroupbox ) The main Idea is to combine them and use them as a list box (I need it this way). The groupbox contains five tedit , one tcombobox and one tbutton . The problem is when I try to free the tdragdata inside its event handler. I use the FreeNotification method to relocate the group boxes in the framedscrollbox . The problem is that the overridden notification method is executed twice for some reason I don't know. My question is: Why the overridden method is executed twice? If I remove the condition (self

Detect where ListViewItem has been clicked/pressed

╄→尐↘猪︶ㄣ 提交于 2019-12-02 07:55:54
问题 In Delphi XE8 using a Firemonkey TListView. I have a ListView with about 5 items in it. Each item has an image within them. How would one detect when the image is clicked/pressed?. I've been looking at the procedure: OnItemClickEx But I do not understand how to use it. Wasn't sure if this is what I need to use or not. Any help would be great. Thanks, 回答1: Set Listview item image object properties.... procedure TForm1.OnFormCreate(Sender:TObject) begin ListView1.ItemAppearanceObjects

Delphi Firemonkey Cross Platform - Generic way to pass a Windows Handle

喜欢而已 提交于 2019-12-02 07:51:03
问题 I'm knee deep in my second Firemonkey app for Windows and OSX and slowly converting my library of functions to handle cross platform issues. I am trying to create a generic SelectDirectory function that will run platform specific code for Windows or OSX. I have SelectDirectory working great for both platforms called individually, but the Windows specific one requires a hwndparent handle to run. This is being run in a IFDEF MSWINDOWS directive (just as the OSX one is in its compiler directive)

Firemonkey: TGrid usage on Embarcadero C++ Builder XE3

为君一笑 提交于 2019-12-02 07:16:15
I'm try to build a tool that reads data from a database and displays it as a table using a TGrid in Firemonkey. I need to use different types of columns like TCheckColumn and TPopupColumn but can't find any good guide or example on how to use them in C++ Builder. Any way, I managed to understand the usage of the TStringColumn,TProgressColumn setting the Value of the cell in the TGrid's event onGetValue. Does any one of you know how to set the Value for columns of type TCheckColumn, TImageColumn and TPopupColumn? thanks Daniele ---UPDATE--- I managed to use the TProgressColumn. This is what I

Clear TEdit control rad studio delphi

柔情痞子 提交于 2019-12-02 06:18:10
When use TEdit control on the right side stay small icon 'x'. How after click on icon clear TEdit box. Tnx all! Sami Delphi provide TClearEditButton to clear the TEdit content. It can be added by right clicking and selecting AddItem - TClearEditButton from the popup menu. It also has a Click procedure overriden in FMX.Edit unit like: procedure TClearEditButton.Click; var EditTmp: TCustomEdit; begin inherited Click; EditTmp := GetEdit; if EditTmp <> nil then begin if EditTmp.Observers.IsObserving(TObserverMapping.EditLinkID) then if not TLinkObservers.EditLinkEdit(EditTmp.Observers) then Exit;

Delphi Firemonkey Cross Platform - Generic way to pass a Windows Handle

你离开我真会死。 提交于 2019-12-02 06:14:51
I'm knee deep in my second Firemonkey app for Windows and OSX and slowly converting my library of functions to handle cross platform issues. I am trying to create a generic SelectDirectory function that will run platform specific code for Windows or OSX. I have SelectDirectory working great for both platforms called individually, but the Windows specific one requires a hwndparent handle to run. This is being run in a IFDEF MSWINDOWS directive (just as the OSX one is in its compiler directive). How can I pass a generic handle to this function or how can I reference Application.MainForm or

How to crop an FMX TBitmap

折月煮酒 提交于 2019-12-02 05:04:18
问题 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: