Jump to content

Uwe Raabe

Members
  • Content Count

    2612
  • Joined

  • Last visited

  • Days Won

    154

Everything posted by Uwe Raabe

  1. Uwe Raabe

    Zoom forms in design mode

    Delphi 11.3 is running in DPI aware mode per default. You have basically two options: in the High DPI designer options switch to automatic mode. That will scale the form according to the current Windows scaling and change all the positions and sizes in your DFMs start the IDE in DPI unaware mode. There should be a suitable entry in your Windows start menu.
  2. This kind of approach is usually seen when types previously declared in that unit have been moved to another one. Otherwise existing code would no longer compile. My personal preference would be to add all needed units to the uses clause. As always there might be exceptions with valid reasons.
  3. Uwe Raabe

    Changing the DBGrid datasource changes its aspect

    That won't explain the different appearance of the header. Nevertheless, way too less information to find the cause.
  4. Uwe Raabe

    Enabled := False makes color Glyphs disappear

    What Delphi version are you using? TBitBtn supports Images since Delphi 10.4. If by any chance you are able to use one of the more recent Delphi versions, I suggest to use the image list approach. It is way easier to maintain, especially when you plan to support High DPI in the future.
  5. Uwe Raabe

    Enabled := False makes color Glyphs disappear

    Probably depends on the Delphi version you are using.
  6. Uwe Raabe

    Enabled := False makes color Glyphs disappear

    If you use the Glyph property of TBitBtn, this will indeed be quite tedious. The preferred way is to use the Images property to assign an image list and set the ImageIndex/ImageName and DisabledImageIndex/DisabledImageName to the proper icon. There are also such properties for the Hot, Pressed and Selected states.
  7. Uwe Raabe

    Delphi 12 and *.dsv

    Actually it contains both:
  8. Uwe Raabe

    "for i in" goes in reverse

    A workaround would be to declare the array as a constant or create a dynamic array on the fly: for I in TArray<Integer>.Create(45, 30, 15) do
  9. Uwe Raabe

    'View as Text' command menu item?

    AFAIK, this command is only available from the context menu of the form designer.
  10. Uwe Raabe

    Minor Uninstaller bug

    While I have the same problem when using alternative registry keys (instead of BDS), I thought of creating a separate management tool, but as ever so often spare time is limited and valuable.
  11. Uwe Raabe

    Minor Uninstaller bug

    This usually happens when MMX has been installed for all users, i.e. as an admin. That will use HKLM for the Experts entry, which will be copied to HKCU when a user starts Delphi. As the installer didn't add these registry entries, it refuses to remove them when uninstalling (this is standard behavior of InnoSetup). Actually, these kind of quirks are the reason why Install for me only is recommended. If you are the only user at the system it doesn't matter at all and if you are not, each user will have its own copy of MMX installed (they can even have different versions). I always try to clean up as neatly as possible when uninstalling, but I didn't find a reliable way to do that without jumping through hoops with the registry and several user folders.
  12. Uwe Raabe

    Minor visual bug

    You can always configure a different (or even no) shortcut to any MMX command. See MMX properties -> Key bindings.
  13. You might already have seen it: When you go to https://quality.embarcadero.com/ there is a notice at the top saying: So be prepared (presumably already today) for not being able to file new reports or edit/comment on existing ones. Searching and reading should be possible. While this will most certainly lead to complaints, it is definitely a good thing and long awaited change.
  14. Uwe Raabe

    Threadvar "per object"

    and for class var.
  15. Uwe Raabe

    Serialize/Deserialize Enums with no RTTI

    I know, that probably won't solve your problem, but I usually get rid of these kind of enumerations in favor of proper ones supported by RTTI. The numerical values are handles by record helpers: type TReportTypeCode = (reportTypeCodeSTR, reportTypeCodeLCTR, reportTypeCodeCDR, reportTypeCodeLVCTR, reportTypeCodeEFTR); TReportTypeCodeHelper = record helper for TReportTypeCode private const cMapping: array[TReportTypeCode] of Integer = (102, 106, 113, 14, 145); function GetAsInteger: Integer; procedure SetAsInteger(const Value: Integer); public property AsInteger: Integer read GetAsInteger write SetAsInteger; end; function TReportTypeCodeHelper.GetAsInteger: Integer; begin Result := cMapping[Self]; end; procedure TReportTypeCodeHelper.SetAsInteger(const Value: Integer); begin for var idx := Low(Self) to High(Self) do begin if cMapping[idx] = Value then begin Self := idx; Exit; end; end; raise EInvalidOperation.Create('invalid Integer value for TReportTypeCode'); end; Now there is no more casting to and from Integers.
  16. Uwe Raabe

    F1 context help to WinAPI ?

    IIRC, they dropped the use of MS Document Viewer a while ago. While there are help items for a handful of Windows functions, there also is a hint to the MSDN online library, which IMHO is always the better up-to-date source.
  17. Uwe Raabe

    F1 context help to WinAPI ?

    Strange - this is what I see:
  18. Uwe Raabe

    Quality Portal going to be moved

    Perhaps the server outage made it one.
  19. Uwe Raabe

    Variable might not have been initialized

    Given the use of Data in the following lines, I suspect that the begin end should wrap a much larger region.
  20. Uwe Raabe

    Variable might not have been initialized

    Reading the code despite of its irritating formatting reveals the problem: WorkOrdersSelectedRow := WorkOrdersGrid.Selection.Top; if FWorkOrderManager.GetWorkOrderDataByIndex(WorkOrdersSelectedRow - 1, Data) then // evaluates file index FileIndex := ARow - 1; if (FileIndex < 0) or (FileIndex >= TWorkOrderData.FILE_DATA_SIZE) then Exit; FileIndex will not be initialized when the if clause fails. BTW, it also irritates that the compiler is charged guilty first.
  21. Uwe Raabe

    Essential Delphi Addins survey

    Essential Delphi Add-ons
  22. I would love to see a bug-fixes-only release, but I am realistic enough to put my hopes pretty low. I also know that a lot of complaints about missing new features will be triggered by such a release.
  23. Uwe Raabe

    OpenAPIClientWizard

    Mean as I am, I tried to pester the wizard with a pretty big chunk: https://github.com/microsoftgraph/msgraph-metadata/blob/master/openapi/v1.0/openapi.yaml Unfortunately it fails with a
  24. Uwe Raabe

    OpenAPIClientWizard

    A look into the GitHub repo reveals:
×