Shoutbox

ListViewControl + ReportView + HasCheckboxes + OnWindowIdEvent_LstViewClicked = Bug - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: WLM Plus! Bug Reports (/forumdisplay.php?fid=7)
+----- Thread: ListViewControl + ReportView + HasCheckboxes + OnWindowIdEvent_LstViewClicked = Bug (/showthread.php?tid=63702)

ListViewControl + ReportView + HasCheckboxes + OnWindowIdEvent_LstViewClicked = Bug by OcuS on 07-21-2006 at 12:26 AM

Hi

I'm using a window which contains a ListViewControl set in ReportView mode with HasCheckboxes set to true.

I want to get the ListViewControl first item's checked status,
so I've created the OnWNDInterfaceEvent_LstViewClicked event listener.

When clicking on the item's text OnWNDInterfaceEvent_LstViewClicked  is called and

code:
PlusWnd.LstView_GetCheckedState(ControlId, ItemIdx);
returns the real checked status (no problem here)

but

When clicking on the item's checkbox LstView_GetCheckedState(...) returns the opposite of the real status...

It behaves as if the Event_LstViewClicked was fired before the checkbox is really checked/unchecked...


[Edit]
Install package and type /lvrb in a chat window to test this.


code:
Versions :
MsgPlus.Version: 4.010000228881836
MsgPlus.VersionBuild: 240
Messenger.Version: 8.0.0792.00
Windows.Version: XP (2002) + SP2


RE: ListViewControl + ReportView + HasCheckboxes + OnWindowIdEvent_LstViewClicked = B by CookieRevised on 07-21-2006 at 01:12 AM

quote:
Originally posted by OcuS
It behaves as if the Event_LstViewClicked was fired before the checkbox is really checked/unchecked...
Actually, this is exactly what happens and which is logically the correct behaviour!



When you click on a checkbox this is what happens:

1) The program detects you pressed your mouse button
2) The program grabs the position of your mouse and looks if a control is underneath it
3) If so, it set focus to that control
4) It then checks if there is some associated action with it when you click the control.
5) If so, it performs that action (in this case the action would be to toggle the checkbox)

It can't even be the other way around as the program can not magically know you want to change a checkbox before you first actually click on it...

Or to put it in another way: clicking is the action, the checkbox toggling is the reaction on it. It can't be the other way around.



RE: ListViewControl + ReportView + HasCheckboxes + OnWindowIdEvent_LstViewClicked = B by OcuS on 07-21-2006 at 09:45 AM

Okay,

so how could I detect when the checkbox status change ?


RE: ListViewControl + ReportView + HasCheckboxes + OnWindowIdEvent_LstViewClicked = Bug by Patchou on 07-22-2006 at 05:51 PM

you currently cant but if it's helpful I'll add the event in the next version