firemonkey

SOAP message - Add authentication in http header

徘徊边缘 提交于 2019-12-22 09:57:07
问题 I have to send a SOAP message to a WebService that needs basic authentication in the http request, but I can't find a way to do it. After searching I found some solutions and workarounds, but none of them worked. Here's my code: procedure TMyForm.HTTPRIOHTTPWebNode1BeforePost( const HTTPReqResp: THTTPReqResp; Data: Pointer); var UserName: string; PassWord: string; begin UserName := 'aaa'; Password := 'bbb'; if not InternetSetOption(Data, INTERNET_OPTION_USERNAME, PChar(UserName), Length

Firemonkey - updating visual components

梦想与她 提交于 2019-12-22 09:14:46
问题 We are working with Firemonkey since version 1, and still find difficulties updating components that are currently visible on the screen. There are many 'ways' to request a repaint in Firemonkey, perhaps too many: Applying a style (ApplyStyle event) - mostly when it becomes visible on screen Requesting ".repaint" - some components have this Requesting ".realign" - sometime works, current versions of FMX seem to drop / hide it Requesting ".invalidate" - some components, mostly forms, have this

Delphi XE4 iOS Application failed codesign verification

人走茶凉 提交于 2019-12-22 08:35:23
问题 I have a problem I can not solve with the Application Loader stating: "Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certtificate" Here are some screenshots of my Delphi configuration: Can any one point in the correct direction of things to check? I have doublechecked my mobile provisioning is correct. I have doublechecked certificate ID correct. (I even tried enter a madeup one just to

Firemonkey MouseToCell equivalent

与世无争的帅哥 提交于 2019-12-22 08:08:16
问题 In Delphi VCL if I wanted to see which cell (column and row) of a TStringGrid my mouse was hovering over I'd use MouseToCell. This method is no longer in Delphi (XE2) for FireMonkey apps. Does anyone know how I can determine the cell my mouse is over? OnMouseMove has X & Y values but these are screen coordinates and not cell coordinates. Many thanks. 回答1: There's actually a MouseToCell method in TCustomGrid , which the StringGrid descends, but it's private. Looking at its source, it makes use

Firemonkey Grid Control - Aligning a column to the right

允我心安 提交于 2019-12-22 05:31:26
问题 I am using the FireMonkey Grid control but have an on-going issue in trying to right align a column. From other users postings, I have managed to create a new TColumn type, apply a style to this (text as HorzAlign=taTrailing) and in theory - thought that this would be solution. The values are provided by the OnGetValue function to the Grid control. The problem is however that although at first it looks OK, if you scroll the bar/mouse wheel etc. the new TColumn type column does not appear to

Coloring cell background on firemonkey stringgrid according to value from data

大城市里の小女人 提交于 2019-12-22 04:08:09
问题 It may be basic but I'm have a * * of a time finding sample code to change a row color of a stringgrid based on a value from a database in Firemonkey. I have data coming from a MDB no problems but need the row to be certain colors for ie '1' = red '2' = green etc. I know I have to access the Style elements somehow 'OnApplyStyleLookup'? but at what stage. I have seen questions on changing text style and colour etc but I am digging a hole for myself trying to get to the 'background' element and

How can I display a Delphi form in a panel?

大城市里の小女人 提交于 2019-12-21 23:17:52
问题 I've tried to follow the example of http://docwiki.embarcadero.com/CodeExamples/XE7/en/FMXEmbeddedForm_(Delphi) but I hit my first problem with the children of TCustomForm, which are apparently read only, so I commented that out and put in ArgForm.Parent:= ArgParent; instead, but I still just get an empty screen and can't see the buttons that are in my second form. The code for my main form is: unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System

How to detect the termination of a program in Android?

孤人 提交于 2019-12-21 20:29:52
问题 When a Windows program terminates it calls event handlers like OnClose, OnDestroy and the destructor Destroy. When I want to save some INI settings these are the places to be. I wrote event handlers for all these events but they are not processed when I terminate the program. Does anyone know where I should place the code to be executed when an Android program terminates? I strongly suspect that this applies to iOS as well. Update Johan's answer works for Android as well, although reality is

How to release a Firemonkey control properly, in this case a child form with a parent?

自闭症网瘾萝莉.ら 提交于 2019-12-21 19:42:31
问题 From inside an event handler of the control itself, I would like to delete and free it. A typical use case for TFmxObject.Release , isn't it? However, it only seems to work under Windows, but not Android, and this method is now deprecated anyway. I know, doesn't work is not a good problem description, but currently I'm not able to debug it under android. Under Windows, I see that the event handler continues correctly after the .Release and after it finished, my log message inside my controls

OutputDebugString() with Delphi for MacOS

守給你的承諾、 提交于 2019-12-21 17:24:25
问题 Is there an NSLog declaration in the Delphi OSX units. I failed to find a substitude for OutputDebugString in a Firemonkey application. The final solution looks like this: /// <remarks> /// Output debug string. Output debug string can be seen in Delphi /// View|Debug Windows|Event Log or with 3-rd party programs such as /// dbgview.exe from SysInternals (www.sysinternals.com) /// </remarks> procedure ODS(const Text: string); begin {$IFDEF MACOS} // http://stackoverflow.com/questions/12405447