Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/01/25 in all areas

  1. Rick_Delphi

    BIG changes

    OK, I'm moving as far away from hand coding as possible. So, I'm looking for a company that wants to do the same. If you have new projects or legacy systems built with Delphi and you are looking to hire someone to replace coders or you just want to get started now with the AI code generating future, I'm available. PM me with your contact information and I'll be in touch.
  2. Uwe Raabe

    How do I synchronize two TMemo scrolling? [Solved]

    It depends a bit what the exact use case is, but it probably can be achieved with a class derived from TMemo with the following extensions: type TLinkMemo = class(TMemo) private FLinkedMemo: TLinkMemo; procedure WMVScroll(var Message: TMessage); message WM_VSCROLL; procedure DoScroll(var Message: TMessage); public property LinkedMemo: TLinkMemo read FLinkedMemo write FLinkedMemo; end; procedure TLinkMemo.DoScroll(var Message: TMessage); begin var saveLinkedMemo := FLinkedMemo; try FLinkedMemo := nil; Perform(Message.Msg, Message.WParam, Message.LParam); finally FLinkedMemo := saveLinkedMemo; end; end; procedure TLinkMemo.WMVScroll(var Message: TMessage); begin inherited; if FLinkedMemo <> nil then FLinkedMemo.DoScroll(Message); end; In FormCreate you just assign both LinkedMemo properties: procedure TForm1.FormCreate(Sender: TObject); begin Memo1.LinkedMemo := Memo2; Memo2.LinkedMemo := Memo1; end; To avoid having to register this new control TLinkMemo you can use an interposer class declared before the form, either in the same unit or in a separate unit used in the interface uses clause. type TMemo = class(TLinkMemo); Note, that editing one of the memo will break sync between the controls.
  3. Attila Kovacs

    BIG changes

    It might also be worth considering a shift from forums to blogging platforms.
  4. Brian Evans

    How to NOT save changes when compiling?

    Note "IDE Insight", a search box on the right of the title IDE Window's title bar can be used to search for settings. Once you remember it exists finding settings is usually much faster than manually going through the settings dialogs.
  5. And if you run into problems with that, see:
  6. Hi, On Windows, the component WebBrowser will use the underlying system rendering engine : By default, IE (!) - You can use a more advanced one, such as Edge, by setting the TWebBrowser's property "WindowsEngine" in component's inspector. Warning : All of that is "windows" (+Edge) only, and behave differently on other platform. If you have a recent Windows + Edge installed, and do not need an advanced use, it should be ok. If you need more advanced use with more option I invite you to go see the chromium engine. If you are only on Windows, you can try edge webview runtime, from the same author, wich is (a little) simpler to use.
  7. Jonah Jeleniewski

    pasfmt out now!

    pasfmt is now available as a GitHub action. This enables easy integration into GitHub CI workflows. View it on the GitHub Marketplace: https://github.com/marketplace/actions/pasfmt
  8. Remy Lebeau

    Correctly displaying a Message Dialog in FireMonkey

    TDialogService.MessageDialog() is asynchronous on Android, per the documentation, so the dialog won't appear until after SpeedButton5Click() has exited. As such, your code is trying to use the Reply variable before it has actually been assigned a value, which is why StartLogin10() is not being called. Android simply does not support modal dialogs, and so the RTL does not implement any synchronous dialogs on Android. See Using FireMonkey Modal Dialog Boxes, TCommonCustomForm.ShowModal(), and IFMXWindowService.CanShowModal() for more details. You need to move the call to StartLogin10() inside the MessageDialog() callback, eg: procedure TFrmLogin.SpeedButton5Click(Sender: TObject); begin if (lst2.Items.Count <> 0) and (lst2.ItemIndex <> -1) then begin TDialogService.MessageDialog('you are gonna edit something ', TMsgDlgType.mtInformation, [TMsgDlgBtn.mbYes], TMsgDlgBtn.mbYes,0, procedure(const AResult: TModalResult) begin if AResult = mrYes then StartLogin10 else ShowMessage('you have cancel the operation'); end ); end else ShowMessage('chose something from the list'); end;
×