我正在設計一個兩列彈出選單。它被設計為使用Form(作為彈出選單容器)、TableLayoutPanel(正確排列按鈕)、Button(作為彈出選單項)和ImageList(作為彈出選單項的圖示)。
當用戶在 Windows 的 100% 比例上時,設計,尤其是布局與預期的一樣:

但是,當用戶使用 Windows 的 150% 比例時,彈出選單項的位置只是分散/重疊/超出范圍:
第一個示例:

第二個例子:

僅供參考,對于彈出選單左欄中的選單項,我設定的屬性是:
FlatStyle = Flat,
ImageAlign = MiddleRight,
RightToLeft = Yes,
TextAlign = MiddleLeft,
TextImageRelation = Overlay.
至于彈出選單的右欄,我設定的屬性是:
FlatStyle = Flat,
ImageAlign = MiddleRight,
RightToLeft = No,
TextAlign = MiddleLeft,
TextImageRelation = Overlay.
Then, for the menu item's texts, they were set from the Text properties of Microsoft Visual Studio. For the spacing/ padding between each menu item's text, shortcut key's text and images, I simply used white spaces to align and to arrange them in a column.
What I've tried to do was to mess around with the TextImageRelation and AutoSize=True(hoping this could automatically arrange the layouts properly for me, but no). Then, I have also tried changing from using white spaces to String.PadRight() for the popup menu item's labelling, because my initial suspect for my problem is the use of white spaces to add padding between the popup menu item's texts and images. However, they all didn't work.
Then, I found this
(ii)

對于Scale: 150%:
(i)
(ii)

從上面的圖片來看,似乎沒有太大區別。因此,為了能夠比較,我截取了一些截圖并將它們并排放置:

謝謝!
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/443397.html
