Jump to content
Sign in to follow this  
JackT

Bug TDialogService.MessageDialog on Windows

Recommended Posts

function FMXMessageDialog(const AMessage: string; const ADialogType: TMsgDlgType;
  const AButtons: TMsgDlgButtons; const ADefaultButton: TMsgDlgBtn): Integer;
var
  mr: TModalResult;
begin
  mr:=mrNone;
  // standart call with callback anonimous method

  TDialogService.MessageDialog(AMessage, ADialogType, AButtons,
    ADefaultButton, 0,
    procedure (const AResult: TModalResult)
    begin
      mr:=AResult
    end);

  while mr = mrNone do // wait for modal result
    Application.ProcessMessages;
  Result:=mr;
  end;

The code works fine. However depending on which monitor the dialog spawns on, on my system the text is clipped. Dragging the dialog back to monitor 1 from monitor 2 makes the dialog draw correctly. Delphi Alex 11.3. The scale on monitor 1 is 150% and and on monitor 2 it's 100%. 

Clipped.JPG

Clipped2.JPG

Share this post


Link to post

I solved the problem by writing my own implementation of IFMXDialogServiceAsync and IFMXDialogService for windows.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×