Computer Workshop forums

EZGUI 5.0 Professional => EZGUI 5 support forum => Topic started by: Raymond Couzens on March 16, 2023, 07:39:48 am

Title: ListView Scrollbar messages
Post by: Raymond Couzens on March 16, 2023, 07:39:48 am
Hi, is there a way of getting the vertical and horizontal scroll bar position change events from a ListView control with EZGUI5?  I think the appropriate Win32 API messages are WM_VSCROLL and WM_HSCROLL but how to get these messages from EZGUI?  Thanks.
Title: Re: ListView Scrollbar messages
Post by: Raymond Couzens on March 16, 2023, 08:09:13 am
After a little more reading I found the answer! Needed to sub-class the ListView control which then gave me access to all the Windows Messages for it.
Title: Re: ListView Scrollbar messages
Post by: Chris Boss on March 16, 2023, 11:03:47 am
If you select the %EZ_Subclass event for a control in the designer (or use EZ_Subclass command in hand written code) you can subclass a control and it will now get the %EZ_Subclass event.

There are a number of support commands which make working with %EZ_Subclass event easier such as:

EZ_SubClassDefault
EZ_GetSubClass
EZ_SetSubClassRVal

EZGUI actually subclasses all new controls (to provide some features not normally available), but each control has a subclass mode it is in and this determine what events get through.

EZGUI has multiple subclass modes internally, including the Visual Designer mode ( enables drag and drop and resizing of controls with the mouse).


Title: Re: ListView Scrollbar messages
Post by: Raymond Couzens on March 16, 2023, 11:23:35 am
Thanks Chris, but I'd already worked out what was needed.