TurboPack / Orpheus

Orpheus is an award-winning UI toolkit for Embarcadero Delphi & C++Builder
Other
99 stars 36 forks source link

Issue using TOvcNotebook #37

Closed tranquilodn closed 1 year ago

tranquilodn commented 1 year ago

When using a TOvcNotebook and we have a TLabel or TEdit etcetera using a different set of anchors, it messes up the position and size of the TLabel and TEdit.

Steps to replicate the matter with Orpheus installed on the IDE:

  1. Create a new VCL project;
  2. Drop a TOvcNotebook on the Form and add Three new pages.
  3. On the Third Page, add a TPanel, set as Align to Client and drop a TEdit on it and change Anchors to be only bottom and right checked.
  4. Save the project.
  5. In design mode, hit Alt + F12 to go to DFM text mode.
  6. Hit Alt + F12 again and when back to the form, click to set the Second Tab and save (Ctrl + S).
  7. Click the third tab and save again.

If you repeat all these steps on Delphi 11.2 you will see that the TEdit will be with its Left position Negative.

Repeating the Step 3 but keeping the Anchors Left checked and only checking the Right as well, it will zero the Width property of the TEdit as oppose to moving it to the left to a negative position.

Thank you very much for your prompt response.

Kind regards,

Tranquilo Dognini Neto GDK Software UK

romankassebaum commented 1 year ago

Orpheus is an old component that does not support HighDPI. I guess that you are working with the HighDPI designer which will not work.

You should start the IDE in the DPI unaware mode or use Sydney for designing.

tranquilodn commented 1 year ago

Turning off or running DPI unaware does not fix the issue.

This issue is related to Anchors on a TEdit, TLabel on a TPanel which is on a Page of a TOvcNotebook. if the panel is Align = Client, every time we open the form it messes up the position.

I've tested it with both dpi unaware on Delphi 11 and Delphi 10.4. The issue happens on both.

tranquilodn commented 1 year ago

We have resolved the reported issue with TOvcNotebook, and I would like to submit a pull-request.

How should I proceed?

Thank you very much.

Kind regards,

Tranquilo Dognini Neto GDK Software UK

romankassebaum commented 1 year ago

Send me the code or write a pull request. I will merge the code.

tranquilodn commented 1 year ago

Hi!

I don't have permission to create a branch and submit a pull-request. I'm attaching the file with the solution applied here. ovcnbk.zip

If you have any questions, please let me know.

Kind regards,

Tranquilo.

romankassebaum commented 1 year ago

I added your code. Many thanks for it.