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 = {
      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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!