Can someone confirm this on a similar setup?

Can someone confirm this on a similar setup?
(https://quality.embarcadero.com/browse/RSP-16907)
Toolbar Buttons re-ordered on High-DPI

Buttons on a toolbar are reordered when the form is dragged from a monitor set to 200% to one set to 100%.
This doesn't happen when the high DPI monitor is set to 175% or less.

- setup a dual monitor environment with 100% and 200% DPI scaling
- create a new VCL forms application
- drop a TToolbar on it
- create three toolbuttons
- set ToolBar1.ShowCaptions to true (to distinguish buttons)
- start the program on the 100% monitor
- drag the form to the 200% monitor
- drag the form back to the 100% monitor

exp: toolbars are ordered 1, 2, 3
act: toolbars are ordered 1, 3, 2

Comments

  1. It even happens with 125% when you place at least 8 buttons on the toolbar.

    ReplyDelete
  2. Added a workaround in a comment to that issue.

    ReplyDelete
  3. Can it be related to the same ordering issue that you can see for f.x. panels if you hide/unhide in the same order?

    ReplyDelete
  4. Lars Fosdal Probably something like that. I was able to track it down to a call to SetBounds where the button is placed left of the previous one because that one was not handled yet. Interestingly that is only happening once. Further movements between monitors keep the (now wrong) order. Seems like the order of the buttons doesn't match the order of Controls inside TToolbar initially, but I couldn't find a way to synchronize that in advance

    ReplyDelete
  5. Attila Kovacs There is only one order inside the DFM. The toolbuttons are children of the toolbar and the order looks quite decent.

    ReplyDelete

Post a Comment