firemonkey

How to get Item.LookupData and SelectedValue (as integer) of an FMX TComboBox at runtime?

别等时光非礼了梦想. 提交于 2019-11-27 08:13:33
问题 There is a ComboBox on the FMX Form. It is binded with a datasource (table that has an id -integer and speciality - varchar fields) in the following manner- object LinkFillControlToField1: TLinkFillControlToField Category = 'Quick Bindings' Control = ComboBox1 Track = True FillDataSource = BindSourceDB1 FillValueFieldName = 'id' FillDisplayFieldName = 'speciality' AutoFill = True BufferCount = -1 AutoBufferCount = False FillExpressions = <> FillHeaderExpressions = <> FillBreakGroups = <> end

Delphi XE2: Possible to instantiate a FireMonkey Form in VCL application?

a 夏天 提交于 2019-11-27 07:06:51
Prior to Delphi XE2, we have VCL only to create GUI apps. Delphi XE2 states that: Caution: FireMonkey (FMX) and the Visual Component Library (VCL) are not compatible and cannot be used in the same project or application. That is, an application must be exclusively one or the other, either FireMonkey or VCL. The incompatibility is caused by framework differences between FireMonkey (FMX) and VCL. My application is a pure VCL application that is built with runtime packages. All VCL forms are stored in a runtime package. If I am going to create a FireMonkey form and store in a package, do I have

Record video from camera on Android to mp4

佐手、 提交于 2019-11-27 03:45:15
问题 There seems to be TVideoCaptureDevice in FireMonkey (Delphi XE6), but on official documentation, capturing process ends up on lines: if(VideoCamera){ //do something } What do I do to record video to mp4 on flight? Tried looking on google, but didn't find any answer... 回答1: See the following docwiki for an answer (sort-of). Delphi Video Capturing in XE7 Of course the word "capturing" here means, getting the video input and putting it on the display. "Recording" means joining the frames

How to get device email address in Delphi 10

女生的网名这么多〃 提交于 2019-11-26 23:26:25
问题 I'm trying to get my device email address, I used Java2OP to convert AccountManager class to object pascal. However, I tried to get the email address using the following code: jAm: JAccountManager; accounts: TJavaObjectArray<JAccountClass>; jAcc: JAccountClass; begin jAM := TJAccountManager.JavaClass.get(SharedActivityContext); accounts := TJavaObjectArray<JAccountClass>.Wrap(jAM.getAccountsByType(StringToJString('com.google'))); mmLog.Lines.Add('Length Accounts: ' + Inttostr(accounts.Length)

Delphi XE2: Possible to instantiate a FireMonkey Form in VCL application?

戏子无情 提交于 2019-11-26 17:37:46
问题 Prior to Delphi XE2, we have VCL only to create GUI apps. Delphi XE2 states that: Caution: FireMonkey (FMX) and the Visual Component Library (VCL) are not compatible and cannot be used in the same project or application. That is, an application must be exclusively one or the other, either FireMonkey or VCL. The incompatibility is caused by framework differences between FireMonkey (FMX) and VCL. My application is a pure VCL application that is built with runtime packages. All VCL forms are

Firemonkey Grid Control - Styling a Cell based on a value (via the OnGetValue function call)

风流意气都作罢 提交于 2019-11-26 17:14:19
问题 I am looking for recommended solution to style a TGrid cell that is being drawn by the OnGetValue call (that is called to paint the cells in view). For background, an excellent response by Mike, showed how to simply apply a tAlign property when the cell is created; but my next challenge is colouring the cell contents. Previous posting/answer The objective is to change the cell attributes (Font, style, colour etc...) of the value I am about to return as the cell "Value". In the example below;

How to free a component in Android / iOS

廉价感情. 提交于 2019-11-26 14:35:02
I dynamically create a TEdit on a form in Android: edit := TEdit.Create(Self); I want to free it using edit.Free , but it just still on form. This code works fine on win32, but failed on Android. The same seems to happen not only for TEdit but for any component using Android or iOS. Short Answer There are two rules that should be followed when releasing any TComponent descendant object under Delphi ARC compilers (currently Android and iOS): using DisposeOf is mandatory regardless of object having owner or not in destructors or in cases where reference is not going out of scope shortly after

How to free a component in Android / iOS

▼魔方 西西 提交于 2019-11-26 03:57:06
问题 I dynamically create a TEdit on a form in Android: edit := TEdit.Create(Self); I want to free it using edit.Free , but it just still on form. This code works fine on win32, but failed on Android. The same seems to happen not only for TEdit but for any component using Android or iOS. 回答1: Short Answer There are two rules that should be followed when releasing any TComponent descendant object under Delphi ARC compilers (currently Android and iOS): using DisposeOf is mandatory regardless of