firemonkey-fm2

How to get the list of fonts available - Delphi XE3 + Firemonkey 2?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-07 06:53:45
问题 In order to create a font picker I need to get the list of fonts available to Firemonkey. As Screen.Fonts doesn't exist in FireMonkey I thought I'd need to use FMX.Platform ? eg: if TPlatformServices.Current.SupportsPlatformService(IFMXSystemFontService, IInterface(FontSvc)) then begin edit1.Text:= FontSvc.GetDefaultFontFamilyName; end else edit1.Text:= DefaultFontFamily; However, the only function available is to return the default Font name. At the moment I'm not bothered about cross

How to access TBitmap pixels directly in FMX2 (TBitmap.ScanLine replacement)?

三世轮回 提交于 2020-12-30 19:36:22
问题 The FMX.Types.TBitmap class has the ScanLine property in FMX (FireMonkey), but it seems this property was removed, and is missing in FMX2 (FireMonkey FM2). Is there any workaround ? How do we supposed to access TBitmap content directly in FMX2 ? 回答1: For direct access you are expect to use the Map method. The documentation includes a number of examples, such as FMX.AlphaColorToScanline: function TForm1.TestAlphaColorToScanline(ABitmap: TBitmap; start, count: integer): TBitmap; var bitdata1,

How to access TBitmap pixels directly in FMX2 (TBitmap.ScanLine replacement)?

你离开我真会死。 提交于 2020-12-30 19:29:42
问题 The FMX.Types.TBitmap class has the ScanLine property in FMX (FireMonkey), but it seems this property was removed, and is missing in FMX2 (FireMonkey FM2). Is there any workaround ? How do we supposed to access TBitmap content directly in FMX2 ? 回答1: For direct access you are expect to use the Map method. The documentation includes a number of examples, such as FMX.AlphaColorToScanline: function TForm1.TestAlphaColorToScanline(ABitmap: TBitmap; start, count: integer): TBitmap; var bitdata1,

How to implement a close button on every tab of TTabControl in Delphi XE3 FireMonkey 2?

醉酒当歌 提交于 2020-01-15 11:39:11
问题 I am trying to create a browser-style TabControl with a small close button on every tab in FireMonkey FM2. Since there are no TTabsheet and TPageControl components in FM2, I could not use the answer from "How to implement a close button for a TTabsheet of a TPageControl". This code gives too many undeclared functions and variables that are not longer supported in FM2, I guess. I don't want to use any third-part components because you never know if they are going to support the next version of

GetKeyState in firemonkey

最后都变了- 提交于 2020-01-01 19:20:08
问题 In VCL (Delphi 2010) I used this function to check whether control key is pressed: function IsControlKeyPressed: Boolean; begin Result := GetKeyState(VK_CONTROL) < 0; end; GetKeyState is function in windows library that I do not want to include it into my project. How can I check if control or shift key is pressed in XE3 for firemonkey application? 回答1: If it helps for anyone else, this is my unit: unit uUtils; interface uses {$IFDEF MSWINDOWS} Winapi.Windows; {$ELSE} Macapi.AppKit; {$ENDIF}

Is it possible in Delphi XE4 to change the app short title without making it the same as the Project dpr name?

本秂侑毒 提交于 2019-12-22 04:31:41
问题 I am writing my first delphi-powered iPhone app. I have created it but I would like it to be named something other than the name of the .dpr file because dpr files cannot contain spaces, for instance, EXE names are not always the same as the human-readable name one might assign an App. Wherease in Windows Delphi apps the EXEs are named the same as the .dpr file which is fine because the english name in your shortcut, or your localized name on your desktop or in your start menu in any other

Firemonkey: TGrid usage on Embarcadero C++ Builder XE3

佐手、 提交于 2019-12-20 04:27:12
问题 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,

How to programmatically alter Font properties in Firemonkey controls

旧街凉风 提交于 2019-12-19 11:29:52
问题 I have some code that paints a set of controls laid on top of a TImage. I then grab the TImage's MakeScreenshot to save out the file. This now works perfectly. What I am now struggling with is changing the font properties of one or more labels / text style controls. No matter what I try, the label does not change. Below is my sample code :- procedure TfrmSnapshot.Process; var LRect1, LRect2, LRect3, LRect4: TRectF; X, Y, W, H: Integer; begin // X := Round(Label1.Position.X); Y := Round(Label1

FireMonkey tray icon with a menu

送分小仙女□ 提交于 2019-12-12 03:45:55
问题 Continuing the favorite question from last year, and with Delphi XE3 (Firemonkey 2) out there is still vague support for the silly little tray icon, on any platform whether it's full-fledged OS or iOS. Suppose we have a tray icon by using platform-dependent code. How would you "click" that icon to receive an FMX HD Form (perhaps a menu or a more hi-fi experience)? There are a few tricky things to overcome, and please think of a way to do so without installing OS support outside of the

Add icons to the tabs of a Firemonkey TTabControl

≯℡__Kan透↙ 提交于 2019-12-11 03:45:19
问题 To add an icon to a TButton in Firemonkey one can add a TImage to the button. But how to add an icon to a tab of a TTabControl? Is this possible? 回答1: At the very least you'll need to modify the style (to add the image) and probably create a custom control descended from TTabControl to set the image data. 来源: https://stackoverflow.com/questions/15550494/add-icons-to-the-tabs-of-a-firemonkey-ttabcontrol