firemonkey

Delphi firemonkey TCombobox extreme slow opening

删除回忆录丶 提交于 2019-12-12 07:04:05
问题 Windows 10, Delphi 10.2 Tokyo, Firemonkey framework. I drop a TCombobox on the form, populate it with 20000 items (takes 5 seconds), then when I click the arrow of the combobox for the dropdown to appear, it takes 15 seconds to do so. The VCL TComboBox does this instantly for me. Is there anything I can do to speed up this behavior? Why does it take that long? 来源: https://stackoverflow.com/questions/43232968/delphi-firemonkey-tcombobox-extreme-slow-opening

How to send email using gmail app in Delphi XE5?

折月煮酒 提交于 2019-12-12 05:43:15
问题 It's simple: i'm trying to create an email using the gmail app for android, just like when you share something using gmail. I have no idea how to do it. 回答1: Found it: procedure TfrmSendMail.CreateEmail(const Recipient, Subject, Content, Attachment, Attachment2: string); var Intent: JIntent; Uri: Jnet_Uri; AttachmentFile: JFile; begin Intent := TJIntent.Create; Intent.setAction(TJIntent.JavaClass.ACTION_SEND_MULTIPLE); Intent.setFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK); Intent

firemonkey add item to HorzScrollBox on the fly

妖精的绣舞 提交于 2019-12-12 05:28:33
问题 i have a Horizontal Scroll Box item on my form.after run the program i will get a json string that include the list of items that must be in Horizontal Scroll Box .and i must add them dynamically. for example i have this : after run the program in the ? area i must a a new image. i found the function : HorzScrollBox1.AddObject(); but a argument is required for this i have two question: 1)how can i add the new object to this? 2)can i clone an existing image and add it at the end of the list?

Delphi TEdit to filter Tstringgrid with Access

拟墨画扇 提交于 2019-12-12 04:43:40
问题 I'm using Delphi 10 with Firemonkey, i'm a bit new to it. I have a TStringGrid that i bound with LiveBindings to a access database. What I need is to filter this table or the TStringGrid with the text of a TEdit when I press a button or when any key is enter, and the show it in the results in the same TstringGrid. Just like a custom search/filter box. I don't have any code of this yet. But i think it would be like a query. procedure TForm3.Edit2Typing(Sender: TObject); begin adoquery1.Close;

How to use HextoBin in Delphi Firemonkey for Android

寵の児 提交于 2019-12-12 04:38:36
问题 I'm trying to adopt some Windows code to Android, but I am unsuccessful. When I try to compile the following code, I get an error: [DCC Error] There is no overloaded version of 'HexToBin' that can be called with these arguments var BinaryStream: TMemoryStream; HexStr: String; WSocket: TWSocket; begin HexStr := memo1.Text; BinaryStream := TMemoryStream.Create; try BinaryStream.Size := Length(HexStr) div 2; if BinaryStream.Size > 0 then begin HexToBin(PChar(HexStr), BinaryStream.Memory,

Delphi: How to make TButtons 3x3?

为君一笑 提交于 2019-12-12 04:30:57
问题 I've created multi TButtons. Problem is I'd like created buttons looks like 3x3. How to do that? Note: Buttons will be more! My code: procedure TForm1.CreateButtonsClick(Sender: TObject); var i:integer; B: TButton; begin for i:= 1 to 7 do begin B := TButton.Create(Self); B.Text := Format('Button %d', [i]); B.Parent := Self; B.Height := 23; B.Width := 100; B.Position.X:=25 + i* 105; B.Position.Y:=70; end; end; 回答1: Since you mentioned using a TGridLayout, here is some code which show how to

How do I make a beep sound in Android using Delphi and the API?

这一生的挚爱 提交于 2019-12-12 04:06:18
问题 After having a look at the Androidapi.JNI.Media.pas, I coded the following procedure: uses Androidapi.JNIBridge, AndroidApi.JNI.Media; procedure Sound(ADuration: Integer); implementation procedure Sound(ADuration: Integer); var Volume: Integer; StreamType: Integer; ToneType: Integer; ToneGenerator: JToneGenerator; begin Volume := TJToneGenerator.JavaClass.MAX_VOLUME; StreamType := ? ToneType := TJToneGenerator.JavaClass.TONE_DTMF_0; ToneGenerator := TJToneGenerator.JavaClass.init(StreamType,

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

Delphi XE5 Firemonkey TStringGrid OnClick event

吃可爱长大的小学妹 提交于 2019-12-12 03:39:44
问题 I have a very strange problem with Delphi Firemonkey TStringGrid on Android. It looks like that events on TStringGrid are triggered differently on windows and android platform. For example: in windows firemonkey application I have a string grid with a few columns. TStringGrid is set as read only. OnClick event I have the following code: TStringGrid(Sender).Cells[TStringGrid(Sender).ColumnIndex,TStringGrid(Sender).Selected] := 'result'; Android application has exactley the same code OnClick

FMX form in VCL app via TFireMonkeyContainer - application freezing

萝らか妹 提交于 2019-12-12 03:36:42
问题 I'm using the TFireMonkeyContainer control to embed a Firemonkey form inside a VCL application. Initially, everything works fine. However, whenever I do something which triggers a TChangeTabAction (to slide back and forth between tabs in a TTabControl ), the entire application freezes up and stops responding. Even Windows is unable to detect that it's not responding - the title bar is even frozen as well, and I have to either terminate the process from the IDE or from the Task Manager. The