firemonkey

Firemonkey TEdit height

橙三吉。 提交于 2021-02-08 15:45:08
问题 I'm using Delphi Seattle and my application is for Windows Desktop. I'm trying to change the font size of a TEdit. Consequently the height was also modified. At design time everything works well, but when I run my application TEdit ignores the height modification and the text is cut. I've tried to find FixedHeight as suggested here, but I couldn't find this property. Is it possible to change TEdit Heigth? 回答1: This can be solved by overriding the control’s AdjustFixedSize method. As explained

open local pdf file Android

走远了吗. 提交于 2021-02-08 10:38:23
问题 I'm downloading a pdf file to the Downloads folder to view. For iOS and Win32 this is easy because the TWebBrowser handles pdf files fine. My problem is with Android. Below is my code: if (FileExists(LFileName)) // pdf file is there { #if defined(_PLAT_IOS) || defined(_PLAT_MSWINDOWS) Form1->WebBrowser1->URL = "file://" + LFileName; Form1->WebBrowser1->Visible = true; #endif #if defined(_PLAT_ANDROID) Androidapi::Jni::Graphicscontentviewtext::_di_JIntent intent = TJIntent::Create(); intent-

Async InputQuery doesn't handle Cancel button

孤街醉人 提交于 2021-02-07 14:31:21
问题 I'm using a simple call to TDialogServiceAsync.InputQuery() with a single input. It just ignores both the Cancel button and the window's X close button. But the Ok button works fine. This is my code: uses FMX.DialogService.Async; procedure TForm1.Button1Click(Sender: TObject); begin TDialogServiceAsync.InputQuery('Title', ['Insert value'], ['bla bla'], procedure(const AResult: TModalResult; const AValues: array of string) begin if Aresult = mrOk then ShowMessage('Ok!'); if Aresult = mrCancel

Async InputQuery doesn't handle Cancel button

我们两清 提交于 2021-02-07 14:29:19
问题 I'm using a simple call to TDialogServiceAsync.InputQuery() with a single input. It just ignores both the Cancel button and the window's X close button. But the Ok button works fine. This is my code: uses FMX.DialogService.Async; procedure TForm1.Button1Click(Sender: TObject); begin TDialogServiceAsync.InputQuery('Title', ['Insert value'], ['bla bla'], procedure(const AResult: TModalResult; const AValues: array of string) begin if Aresult = mrOk then ShowMessage('Ok!'); if Aresult = mrCancel

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

Why is TImage rotating my image?

岁酱吖の 提交于 2021-02-07 01:59:28
问题 Writing a mobile application - it's pulling images from a secure website, and shown below (the first image) pulls incorrectly (notice web version vs mobile version), the second image shows correctly on the website, but Delphi TImage is rotating it for some reason and I can't figure out why. Rotate is set to 0 and "Fit" is set on the TImage component. Thoughts? 回答1: Jpeg and Tiff have Exif (Exchangeable image file format) metadata that specify image orientation (among other data). It's not

How to get the user input from the frame and save into txt file?

烈酒焚心 提交于 2021-02-05 12:32:02
问题 My programs run like this: I have a form with an add button, save button, and tabcontrol. When the add button in the form is clicked, the tabcontrol will add more tabitem. And the tabitem is basically added from myframe which includes users key-in value in a TEdit. What I want to achieve is to print all the user input from the frame to a txt file when I click on the save button(tick) in the form. This is my code in form. Can anyone please give me some hint? My frame Image: My form Image: My

delphi TStringGrid and right mouse button

南楼画角 提交于 2021-02-05 11:12:31
问题 I am using Delphi 10.1 Berlin to make a Multi-Device application. I have a TStringGrid in order to list some data from a query. I also have a popup menu (edit, delete, ...), but in order to edit/delete an item I have to click on a cell using the left mouse button. Is it possible to "select a row" using only the right button before showing the popup menu? I tried: procedure TForm1.StringGrid1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Button =

Delphi/FMX: How to add a dynamically created top-aligned component under all previously added top-aligned components, instead of second from the top?

自闭症网瘾萝莉.ら 提交于 2021-02-05 06:37:29
问题 I am making an app for Android with Delphi and FMX. In the onclick-procedure of a button I dynamically create a TPanel (with some components in it) which I then add to a TVertScrollBox. I want the TPanels to stack on top of each other, so I set the Align property to Top. procedure TMainForm.AddGroupButtonClick(Sender: TObject); var Group : TPanel; begin Group := TPanel.Create(Self); Group.Parent := Groups; // where Groups is a TVertScrollBox on the form Group.Align := TAlignLayout.Top; //Then

Delphi/FMX: How to add a dynamically created top-aligned component under all previously added top-aligned components, instead of second from the top?

送分小仙女□ 提交于 2021-02-05 06:37:25
问题 I am making an app for Android with Delphi and FMX. In the onclick-procedure of a button I dynamically create a TPanel (with some components in it) which I then add to a TVertScrollBox. I want the TPanels to stack on top of each other, so I set the Align property to Top. procedure TMainForm.AddGroupButtonClick(Sender: TObject); var Group : TPanel; begin Group := TPanel.Create(Self); Group.Parent := Groups; // where Groups is a TVertScrollBox on the form Group.Align := TAlignLayout.Top; //Then