gammasoft71 / xtd

Free open-source modern C++17 / C++20 framework to create console, GUI (forms like WinForms) and unit test applications and libraries on Microsoft Windows, Apple macOS and Linux.
https://gammasoft71.github.io/xtd
MIT License
737 stars 58 forks source link

[BUG] xtd.forms - combo_box very sensitive to click length #194

Closed jimorc closed 1 year ago

jimorc commented 1 year ago

Describe the bug

Opening combo_box drop_down ls very sensitive to click pressure. Pressing lightly/quickly and the drop_down and drop_down_closed events fire one after the other. If a heavier pressure is used, then the drop_down event fires and the drop_down opens. But if the click is held down too long, then the drop_down_closed event fires immediately after the drop_down event. The difference between long enough and too long is very short.

Same program as in issue #193.

To Reproduce

Steps to reproduce the behavior:

  1. Build and execute the program.2.
  2. Click either combo_box lightly.3.
  3. Click and hold the combo_box harder and slightly longer.
  4. Click and hold the combo_box for even longer.

Result is as described in the bug description.

Expected behaviour

combo_box drop_down behaviour should be less sensitive to click pressure and duration.

Screenshots

N/A

None

Workaround

Keep trying until click pressure and duration are correct.

gammasoft71 commented 1 year ago

Apparently, trying to expand the combo_box box2 in the vertical_layout_panel causes message errors on the combo_box box. Totally related to issue #192 and #193.

I will address all three at the same time.

gammasoft71 commented 1 year ago

The issue is fixed.

Remarks

On macOS if the height of the combo_box is greater than 32 pixels, macOS does not draw the combo_box correctly. This will result in a display error between the border and the text of the control (see the print screen below).

When you run an application that uses a combo_box with a height greater than 32 pixels, macOS displays the following message:

"This application is trying to draw a very large combo box, 32 points tall. Vertically resizable combo boxes are not supported, but it happens that 10.4 and previous drew something that looked kind of sort of okay. The art in 10.5 does not break up in a way that supports that drawing. This application should be revised to stop using large combo boxes. This warning will appear once per app launch."

image

gammasoft71 commented 1 year ago

Commit https://github.com/gammasoft71/xtd/commit/cb74b29d39f367141d1b4c6c4a968d476d6c286f