delphi-xe7

How to create gradient button for mobile using Delphi XE7?

空扰寡人 提交于 2020-01-17 08:16:13
问题 I'm using Delphi XE7 for creating Android / iOS mobile application And how can I create the gradient button (Sample Gradient button)using FireMonkey Mobile application. Or should I need to use Style Book for applying the Gradient Colour in the Buttons? 回答1: There's nothing wrong with the tutorial you posted. With Firemonkey everything (visually) is composed of primitive shapes and animations, so using the skills learned in that post, you could create your buttons in gimp, then create a style

Altering ITEMINDEX of TComboBox does not trigger it's OnChange event

心不动则不痛 提交于 2020-01-15 03:13:11
问题 When programmatically changing the value of ItemIndex of a TComboBox component in Delphi, one would expect for the corresponding OnChange event to get triggered. Afterall, the visible value of the ComboBox get's changed as a result. Strangely it does not. Same behavior in Delphi6, Delphi 2010 and Delphi XE7. Is there any reason behind this behavior or it's just a pending bug? 回答1: From documentation: Occurs when the user changes the text displayed in the edit region. Write an OnChange event

XE7 update 1 and iOS 8.1 simulator does not work

烂漫一生 提交于 2020-01-14 18:45:40
问题 With target set to iOS 8.1 Simulator in Delphi XE7, the application crashes. It deploys fine, it also runs, but the firemonkey splash screen remains on and never finishes loading. This happens with a plain new mobile application, only adding one "hello world" TLabel to the form. This began to happen after I upgraded from XE6 to XE7 update 1, and at the same time upgraded XCode 5 to 6.1 (stupid to make do two major upgrades at the same time, because then I don't know which one caused the

Why I can access btn.Caption when btn is NIL?

谁说胖子不能爱 提交于 2020-01-14 07:11:29
问题 Why this code does not crash? T is nil. How it is possible to access Caption if T is nil ? procedure Crash; VAR T: TButton; begin T:= NIL; T.Caption:= ''; <---------- this works end; 回答1: The TButton control is a wrapper around the Win32 Button control. It uses the Windows messaging system to operate upon it. And the core method for doing so, TControl.Perform() , has a built in safeguard against sending messages if Self is nil : function TControl.Perform(Msg: Cardinal; WParam: WPARAM; LParam:

What is 'Limited Debug Information'? (Full “Debugging Information" generates huge EXE files)

二次信任 提交于 2020-01-11 02:35:00
问题 I installed Delphi XE7 recently. When I first compiled an old app my jaw dropped when I have seen that the size of the EXE increased with 10MB! Playing in the 'Project options' I discovered that setting the 'Debug information' to 'Limited Debug Information' decreases the EXE size to something VERY close to the EXE generated by Delphi XE. Maybe under Delphi XE7 'Limited Debug Information' is the equivalent of 'Debug Information' from Delphi XE since it results in the same EXE size? So, why

Delphi XE7 TBannerAd not showing ad on Android

断了今生、忘了曾经 提交于 2020-01-07 06:24:06
问题 I'm trying to test run some admob ads via the TBannerAd component in Delphi xe7, to see if it will work on ios and android. Upon testing the ad seems to load on IOS but on Android nothing happens. I've checked the manifest file and made sure it had the activity and meta data. I'm not sure what the issue is. Could someone shed some light? 回答1: Just checking the obvious - have you enabled the AdMob Service option on the entitlements page in the project options? The entitlements page is new in

Concatenate TStringStream

空扰寡人 提交于 2020-01-06 19:26:11
问题 I would like to concatenate some TStringStreams into one Stream. I have some blob (varbinary(max)) fields in SQL Server and and I want to create a stream from all the rows then save it to a file. var // MSWord: Variant; i: Int32; sA: TStringStream; sP: TStringStream; s: TStringStream; // fString: TStrings; begin sA := TStringStream.Create; s := TStringStream.Create; sP := TStringStream.Create; try with DateED do begin BlobField.SaveToStream(sA); sA.SaveToStream(s); // s.CopyFrom(sA, sA.Size);

Why does my application using OmniThreadLibrary Parallel.Pipeline continue remain running in the background after being closed?

谁都会走 提交于 2020-01-06 03:31:07
问题 I'm using OmniThreadLibrary to implement a background pipleline for sending emails (refer to this SO question). I notice that after closing the application, it continues running in the background (seen in Windows Task Manager). That means that there is something wrong in my code in the way I implemented the OTL pipeline. Can you help me identify the trouble? Code follows: unit uEmailQueue; interface uses Classes, OtlCommon, OtlCollections, OtlParallel, Windows; type TEmailServer = record

Mocking interfaces in DUnit with Delphi-Mocks and Spring4D

自古美人都是妖i 提交于 2020-01-05 07:42:12
问题 So, I am getting Access Violation error when try to Mock 2-nd composite interface, below examples of code with using Delphi-Mocks and Spring4D frameworks unit u_DB; type TDBObject = class public property ID: TGUID; end; TDBCRM = class(TDBObject) public property SOME_FIELD: TSomeType; end; unit i_dmServer; type {$M+} IdmServer = interface ['{A4475441-9651-4956-8310-16FB710EAE5E}'] function GetServiceConnection: TServiceConnection; function GetCurrentUser(): TUser; end; unit d_ServerWrapper;

FMX Style issue with modal forms

老子叫甜甜 提交于 2020-01-05 05:24:07
问题 I'm developing a multi-device application for iOS and Android using Delphi XE7 Update 1. I have a base form from which all forms in my application are driven: object frmBaseForm: TfrmBaseForm Left = 0 Top = 0 Caption = 'Form1' ClientHeight = 480 ClientWidth = 640 StyleBook = sbStyle FormFactor.Width = 320 FormFactor.Height = 480 FormFactor.Devices = [Desktop] DesignerMasterStyle = 0 object sbStyle: TStyleBook Left = 8 Top = 8 ResourcesBin = {