firemonkey

How to play system sound in Delphi FireMonkey XE4?

一世执手 提交于 2019-12-11 01:49:25
问题 I want to play system sound in both Windows and MAC OS X. To play sound in Windows used something like this: PlaySound('C:\Windows\Media\Windows Default.wav', 0, SND_FILENAME + SND_ASYNC); I am sure I have to use TMediaPlayer. 回答1: You are correct, you can use the TMediaPlayer component, documentation clearly states : TMediaPlayer playbacks audio files and the audio component of a video file. To specify the media file to be played by the current TMediaPlayer, set the FileName property. The

Delphi XE4 stringgrid selectcell in FireMonkey

给你一囗甜甜゛ 提交于 2019-12-11 01:21:09
问题 Does anyone know how to retrieve the column and row when selecting a cell in a FireMonkey stringgrid (in other words, when clicking on a cell, we want to know which column/row is being selected)...? We are using Delphi XE4. Thanks in advance. 回答1: To get the index of the current Row, use the Selected property. To get the index of the current Column, use the ColumnIndex property. 来源: https://stackoverflow.com/questions/17808168/delphi-xe4-stringgrid-selectcell-in-firemonkey

fmx delphi berlin how to change font color in rows of Tgrid

时光毁灭记忆、已成空白 提交于 2019-12-11 00:38:28
问题 NEED HELP..I am using delphi 10.1 berlin. There are some different with other previus version of Embarcadero Delphy Code Gear. I need to change font color in rows of TGrid. Whith this next code i will change backgrond color but i need to change only Font Color : aRowColor.Color := arSTATUS_GRID_COLOR[0]; Canvas.FillRect(Bounds, 0, 0, [], 1, aRowColor); Column.DefaultDrawCell(Canvas, Bounds, Row, Value, State); 回答1: Instead of calling Column.DefaultDrawCell() , you can use FMX.Graphics.TCanvas

Delphi Seattle Android TNotificationCenter CancelAll not working after one notification has fired

笑着哭i 提交于 2019-12-11 00:26:16
问题 I'm using Delphi DX Seattle and testing on an android Device when a user clicks a button i'm creating multiple scheduled notifications and when a user clicks another button im clearing the remaining notifications I cant seem to get the TNotificationCenter.CancelAll to actually cancel notifications after one notification has fired Similar Question Here Using the Delphi sample SendCancelNotification as the base code I'm Changing the "Send Notification Immediately" button to "Send Multiple

Why won't controls span multiple columns or rows in an Android FireMonkey app?

谁说胖子不能爱 提交于 2019-12-11 00:16:31
问题 I have a FireMonkey app with a GridPanelLayout, aligned to client. It's got 6 columns and 16 rows. Controls include glyphs, edits, and buttons. The TEdits span multiple columns, and the TButtons span both multiple columns and rows. The controls are currently all aligned to client. When I compile and run on Windows everything looks and acts as expected. However, on Android devices (I tried two, Android 6.0.1, and Amazon FireOS) none of the controls span more than one column or row. They're

Change colour of TLabel in FireMonkey iOS app, and add items to TStringGrid?

拈花ヽ惹草 提交于 2019-12-10 23:25:16
问题 I managed to get Xcode (running as a VM under Windows) pushing an XE2 build FireMonkey iOS HD app to my (jailbroken) iPhone after XE-script-prep (creating the Xcode folder), with a valid company certificate. Anyway, faking the native cocoa controls seems a little seedy, but sticking a TToolbar (panel with standard iPhone gradient), a couple of TSpeedButtons (which have this curious V slope thing going on), and a TStringGrid and you're almost in the realms of basic iPhone app design. Drop a

How to change background color of FMX.TGrid row depend on value in XE4

我们两清 提交于 2019-12-10 21:26:17
问题 I'd like to know how to change background color of whole row in Firemonkey TGrid / TColumn . Saw bunch of similar questions, but none of them helped me. I'm using Delphi XE4. TGrid may contain TCheckColumn and TStringColumn . 回答1: TGrid row background style color is divided into two categories : Focus color Selection color Focus color applies to the focused Cell. Selection color applies to the selected Row. Changing focus color is a straight forward process: procedure ChangeGridCellFocusColor

Modal Android Dialog using Delphi 10.2.1 Tokyo

左心房为你撑大大i 提交于 2019-12-10 20:23:50
问题 I have the following Delphi code for showing a modal message on Android which worked fine on 10.1 Berlin, but stopped working on Delphi 10.2.1 Tokyo. This procedure now hangs the Android app. procedure customShowMessage(AMessage: string); //good idea to have our own procedure that we can tweak, as even for VCL and windows, we have done show message differently over the years due to all sorts of funny problems var LModalWindowOpen: boolean; begin LModalWindowOpen := true; TDialogService

Can't set Fire Monkey Form property

点点圈 提交于 2019-12-10 19:25:17
问题 I am trying to initialize form properties in the program source file in a Fire Monkey application and it throws an exception. Here is the code: uses System.StartUpCopy, FMX.Forms, uMainForm in 'Units\uMainForm.pas' {MainForm}, UDataModule in 'Units\UDataModule.pas' {DataMod: TDataModule}, DataHelperClasses in 'Units\DataHelperClasses.pas', EXDIntf in 'Units\EXDIntf.pas', Exd in 'Units\Exd.pas'; {$R *.res} var ViewModel: TEXDViewModel; begin Application.Initialize; Application.CreateForm

Delphi XE6 ARC on OSX releasing variables

痞子三分冷 提交于 2019-12-10 19:08:41
问题 I'm having a problem with NSObject instances being freed when I don't expect. I have a form variable of type NSNumber, in button1 I create an instance and set a value, in button2 I read the value. If I don't call retain in button 1 then the variable is freed and the app hangs when I click button2, adding a call to retain makes everything work. This is on OSX using Delphi XE6 with firemonkey. Here's some code Define a form variable of type NSNumber Fv : NSNumber; Now add a couple of buttons