#15239 closed enhancement (fixed)

Add a method to obtain the number of columns used for horizontal scrolling with mouse wheel

Reported by: toiffel Owned by:
Priority: normal Milestone:
Component: GUI-all Version: stable-latest
Keywords: wxMouseEvent horizontal scrolling wheel Cc:
Blocked By: Blocking:
Patch: yes

Description

Currently there is wxMouseEvent::GetLinesPerAction() that specifies the number of lines to be scrolled vertically per mouse wheel action, but I didn't find a corresponding function for horizontal scrolling.

The attached patch addresses this issue by adding a new wxMouseEvent::GetColumnsPerAction() method. wxMSW port calls SystemParametersInfo() to obtain the necessary information; other ports use the default value of 3. This setting will be useful for scrollable widgets, e.g. wxStyledTextCtrl.

Attachments (2)

get_columns_per_action.patch download (5.7 KB) - added by toiffel 19 months ago.
get_columns_per_action.2.patch download (5.7 KB) - added by toiffel 19 months ago.

Download all attachments as: .zip

Change History (5)

Changed 19 months ago by toiffel

Changed 19 months ago by toiffel

comment:1 Changed 19 months ago by toiffel

Oops, added the same patch twice. Please ignore/delete the second one:)

comment:2 Changed 19 months ago by vadz

  • Status changed from new to confirmed

Thanks, will apply soon but I've changed the value used under OS X to 1 for consistency with the value used for the lines. I have no idea why is it one there but it seems strange to scroll by 1 line and 3 columns when vertical scrolling is usually more granular than horizontal one.

comment:3 Changed 19 months ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [74156]) Add wxMouseEvent::GetColumnsPerAction().

This is similar to the existing GetLinesPerAction() but is for, surprise,
columns.

Also change the documentation to say that the value returned by both of these
methods is 3 under "most platforms" as some wxOSX currently uses 1 and not 3.

Closes #15239.

Note: See TracTickets for help on using tickets.