Jump to content

MathiasBurbach

Members
  • Content Count

    2
  • Joined

  • Last visited

Everything posted by MathiasBurbach

  1. MathiasBurbach

    High DPI & anchoring in Delphi 11

    Hello Folks! After watching Ray Konopka’s brilliant presentation on Leveraging High DPI in VCL Applications at the ADUG symposium, we thought it is time to move our project to Delphi 11 and use TImageContainer and TVirtualImageList components. Our customer suggested to use the Google icons 1 that are available in different resolutions under the Apache License scheme. The icons are scaling well in toolbars, bit buttons and Delphi’s own DB navigator. What we did not expect but are witnessing is problems with right anchored labels. Right anchored controls move nicely to the new DPI setting of the second screen and back to the original 96 dpi of the first screen. But labels move out and not back. The second screen is set to of 150% scaling. The source code is available for download from here. For those not having Delphi 11 the executable is available for download from here. If I move the label into a panel, align the label left and the panel to the right it is working too. At this stage it seems I need to calculate the left position of the right aligned label each time TFrom.OnAfterMonitorDpiChanged is triggered. That can’t be true. Any ideas how to trick Delphi into doing the right thing? Salut, Mathias
  2. MathiasBurbach

    TFDMemTable & TSQLTimeStampOffsetField

    Hello Folks, we are trying to use the TSQLTimeStampOffsetField defined in Data.DB.pas for a TFDMemTable. We created a static field list and tried to open the TFDMemtable. We run into an error: The call stack ... Data.DB.DatabaseError('Type mismatch for field ''Start'', expecting: TimeStampOffset actual: Unknown',$1767270) Data.DB.DatabaseErrorFmt('Type mismatch for field ''%s'', expecting: %s actual: %s',(...),$1767270) Data.DB.TDataSet.CheckFieldCompatibility($1758D20,$17FFE10) Data.DB.DoBindFields($17FFF60) Data.DB.TDataSet.BindFields(True) FireDAC.Comp.DataSet.TFDDataSet.InternalOpen Data.DB.TDataSet.DoInternalOpen Data.DB.TDataSet.OpenCursor(???) FireDAC.Comp.DataSet.TFDDataSet.OpenCursor(False) Data.DB.TDataSet.SetActive(???) FireDAC.Comp.DataSet.TFDDataSet.SetActive(???) Data.DB.TDataSet.Open FMain.TfrmMain.FormCreate($1780E30) Vcl.Forms.TCustomForm.DoCreate Vcl.Forms.TCustomForm.AfterConstruction System._AfterConstruction($1780E30) Vcl.Forms.TCustomForm.Create(???) Vcl.Forms.TApplication.CreateForm(???,(no value)) ... indicates that the TDataSet.CheckFieldCompatibility method points to a FieldDef for the column Start, for which the data type is unknown. I have tried to setup the FieldDefs first before opening the TFDMemTable but that did not help either. Why can I define a field of type TSQLTimeStampOffsetField but when I open the dataset the data type is unknown? I am using Delphi 11 Alexandria Version 28.0.42600.6491. Thanks for a short answer in advance. Salut, Mathias
×