问题
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 = {
464D585F5354594C4520322E3501060B4465736372697074696F6E039F00060E....
end
end
It has a TStyleBook
with a custom style, and following code:
procedure TfrmBaseForm.DoClose(var CloseAction: TCloseAction);
begin
inherited;
if ModalResult <> mrNone then
CloseAction := TCloseAction.caFree;
end;
When I run my application, everything works as expected. But, as soon as a modal form is shown and closed (e.g. the above code is executed), style of all my forms is corrupted (form and control background color changes to black, ...)
Any ideas?
来源:https://stackoverflow.com/questions/27840341/fmx-style-issue-with-modal-forms