Selection Count in ListView

Started by khann, September 20, 2009, 06:03:00 PM

Previous topic - Next topic

khann

Hi.
I need some sample code of labeling of selection count in ListView control.
One ListView and one Lable.
I've tried with OnMouseUp event, Click, OnMouseDown, ... but they do not return the count right after the left mouse button.

Someone guide me, please.

I'm using 5.1.1.8 msi.

Thanks.

owenwengerd

Since there is no OnSelChanged event for list view controls, you may need to call (dcl_SendString) or (dcl_DelayedInvoke) from your OnClicked handler to trigger your label update function. By doing this, the list view selection state will have updated by the time your label update function executes.

Fred Tomke

Hello Owen, how hard would it be to add an OnSelChaged event for a listview or would it brake the standard behaviour of the built-in listview? ListBox, Grid and FileExplorer support such an event. I remember a feature request (Point 4) which already contained this.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

There is no corresponding Windows event for the list view control, but a SelChanged event could be manufactured (just as in the grid control).

khann

Thanks for the tip. owenwengerd .
I'll test them.