firemonkey

Delphi TListBox iOS making new itemstyle/behavior

谁说胖子不能爱 提交于 2019-12-06 03:17:35
I need to show custom data. For example I need to show a contact list with name, description, photo. And ideally I would also like to show custom data there, e.g. a button to launch telephone call. The default styles do not quite do what I want, but fairly close. Thus, as far as I can tell, TListBox could be a decent control for this if I could create custom styles? Is that possible? (Anotther problem of course is setting the values of the custom data controls.) You should take a good look at the FMX CustomListBox example AFAIK even the example alone already seems to have exactly what you need

Drawing on FMX canvas with WinApi functions

不羁岁月 提交于 2019-12-06 02:09:42
This question looks very simple, with VCL this is works fine (Image is TImage on VCL): procedure TFormMain.btnDrawBackgroundClick(Sender: TObject); var theme: HTHEME; begin theme := OpenThemeData(0, 'TASKDIALOG'); if theme <> 0 then try DrawThemeBackground(theme, Image.Canvas.Handle, TDLG_SECONDARYPANEL, 0, Image.ClientRect, nil); finally CloseThemeData(theme); end; end; Question: what I should change to get the same effect with FMX (on Windows) Based on this answer you simply can't do that. The problem is that with Firemonkey, you only have a single device context for the form and not one for

Do FireMonkey controls have an equivalent to the VCL Invalidate() method?

♀尐吖头ヾ 提交于 2019-12-06 01:54:29
问题 I'm creating some custom FireMonkey GUI controls. The components need to update in response to user interactions. VCL controls can call Invalidate() to be placed into a queue for repainting. Does FireMonkey have an equivalent method? FireMonkey controls have a Repaint() method, but AFAICT that forces the control to be repainted immediately. A queue type system would be more appropriate in some circumstances. 回答1: Control.InvalidateRect(RectF(0,0,width,height)); 回答2: FireMonkey's TControl

Conditionally compile units for FMX or VCL

☆樱花仙子☆ 提交于 2019-12-06 01:27:25
问题 I want to have a different list of units in the uses clause depending on compiling for FMX or VCL. In the code below I try to test FireMonkeyVersion which works in an FMX project ( label1.Text is 'FMX'). When I move the $IF statement into the uses clause I get an error message ( [dcc32 Error] fmx_text.pas(7): E2026 Constant expression expected ). Is there any way to get the desired conditional compilation? unit fmx_text; interface uses System.SysUtils, System.Types, System.UITypes, System

Delphi - New apps on Google Play must target Android 8 (API level 26) - PUSH notification in background

自作多情 提交于 2019-12-06 00:40:27
问题 From August 2018, all new apps on Google Play must target Android 8 (API level 26) or higher, and from November 2018, all app updates on Google Play must of the same apps on Google Play. Right now the only way you have to upload a new App that target Android 8 is to edit the file AndroidManifest.template.xml and replace targetSdkVersion = "% targetSdkVersion%" by: Android: targetSdkVersion = "26" The problem is that from that moment the app has the restrictions introduced by Android O. The

How to find Resolution under Delphi XE5

纵然是瞬间 提交于 2019-12-05 23:33:02
问题 I started to develop a game under Delphi XE5 for iOS. I have problem with the Resolution feature of the Firemonkey. When I open the screen and I check resolution on the iPhone I get 320x480. But the native resolution of the iPhone 4 and 5 is doubled. I found at official Delphi pages that FireMonkey is recalculating the screen by "Resolution" which is for Retina display 2. I think this is cool feature for regular apps, but when you start to do game and you want to manipulate with images by

FMX form in a DLL (firemonkey/delphi)

空扰寡人 提交于 2019-12-05 20:53:39
Im trying to make a FMX form in a dll, after about 17 hours (of trying diffrent approches) i got it working, except i get a exception trying to unload the dll . I have no idea how to make it work, maybe someone could help me and point out what im doing wrong? side note: i cant have a FMX form in my VCL application becouse of the AA drawing, i just need it on my text while drawing on a canvas and while having a FMX form on a VCL application, i dont get that cleartype on text :( im trying to make a some sort of OSD/HUD. Project showing my problem: exe unit1.pas unit Unit1; interface uses Winapi

Unicode in Delphi form TRectangle TText

自闭症网瘾萝莉.ら 提交于 2019-12-05 14:09:13
I'm new to Delphi & in DelphiXE4 editor I am trying to make chessboard gui on form, using x64 TRectangle for board (alternate colors). I want to add unicode chess pieces but in ObjectInspector properties when I add unicode it displays literally on the form. How can I add Unicode to TText (so the form displays unicode as chess pieces)? (After I want to add dragndrop to TRectangles/unicode chess-any ideas?). Rectangle63: TRectangle; Rectangle64: TRectangle; Text1: TText; Text2: TText; Here is screenshot showing problem: I'm most grateful for help, thanks EDIT: Jeroen's answer worked to solve

FireMonkey iOS RAD Studio XE2 - Display Image on form loaded from URL

岁酱吖の 提交于 2019-12-05 10:30:56
问题 Is it possible to place a TImage on an FMX form for iOS and load image (jpg) from an URL into this TImage to be displayed in the iOS app? I have tried with no success. Any hints or point in the right direction is appreciated. 回答1: Drop a TButton, TImageControl and TIdHttp onto a Firemonkey form and this code will pull down an image from the web: procedure TForm1.btnReadWebImgClick(Sender: TObject); begin ReadWebImage('http://www.gravatar.com/avatar/5af5f8c5f88c6c237745e9472a31410f?s=32&d

Firemonkey (FMX) bitmap and colours

守給你的承諾、 提交于 2019-12-05 08:29:47
问题 Assume I have a small bitmap in Firemonkey (say 32x24 pixels). So I put a TImage onto a form and in the constructor there is this code: Image1.Bitmap.Create(32, 24); if Image1.Bitmap.Canvas.BeginScene then try Image1.Bitmap.Canvas.Fill.Color := claBlack; Image1.Bitmap.Canvas.Stroke.Color := claYellow; Image1.Bitmap.Canvas.FillRect(RectF(0,0,32,24), 0, 0, AllCorners, $FF); Image1.Bitmap.Canvas.DrawLine(PointF(1,1), PointF(10,10), $FF); finally Image1.Bitmap.Canvas.EndScene; Image1.Bitmap