From: hakan <he...@us...> - 2013-01-10 19:08:03
|
----- Ursprungligt Meddelande ----- Från: hakan <he...@us...> Till: Staffan Tylen <sta...@gm...> Kopia: Datum: torsdag, 10 januari 2013 20:03 Ämne: Re: [Oorexx-users] ListView CheckBoxChanged event You can then skip the CheckboxChanged event Connection, looks like you want to eat the cake and also keep it :-) If not an event, how will you know when the checkbox for -ALL- is checked/unchecked, maybe we need some more details what will happen after the un/checkings /hex ----- Ursprungligt Meddelande ----- Från: Staffan Tylen <sta...@gm...> Till:<he...@us...> , Open Object Rexx Users <oor...@li...> Kopia: Datum: torsdag, 10 januari 2013 19:39 Ämne: Re: [Oorexx-users] ListView CheckBoxChanged event Well, I had that in mind but I think that once connect-event is done then there is no disconnect-event that can be used while 'flipping' check-all between on and off (more than once). I think my issue can be solved if the check methods are not treated as events, which IMHO they are not. Staffan On Thu, Jan 10, 2013 at 7:26 PM, hakan <he...@us...> wrote: Staffan May I suggest you create a "toogle" button instead, that checks/uncheck the checkboxes. I had a "similar" problem, in my case the solution was to fill the list Before connecting the Event, if I recall it correct. /hex ----- Ursprungligt Meddelande ----- Från: Staffan Tylen <sta...@gm...> Till: Open Object Rexx Users <oor...@li...> Kopia: Datum: torsdag, 10 januari 2013 19:00 Ämne: Re: [Oorexx-users] ListView CheckBoxChanged event Mark, I understand quite well that you don't understand because I didn't express myself well at all. I'll have another go: I've got a listview defined with the CHECKBOXES style. I've chosen to insert a first row -ALL- that when checked should cause all rows to be checked, and if unchecked all rows should be unchecked. I've implemented the onCheckBoxChanged event and there I test if the first row is checked/unchecked, in which case I call the (un)checkAll method (within the event handler) to set the check marks accordingly. But I can't get this to work and I assume it's because the event handler gets invoked from itself this way and as it runs unguarded the results are unpredictable more or less. So my question is: because (un)check(All) are invoked under program control, i.e. the user is not causing the events, it seems natural if the event handler is NOT invoked under those circumstances, the programmer already has full control of what's going on anyway, hopefully ;) So my suggestion is that these methods don't trigger these events, as they really are no 'events' as such. I hope this helps. Staffan On Thu, Jan 10, 2013 at 6:44 PM, Mark Miesfeld <mie...@gm...> wrote: On Thu, Jan 10, 2013 at 9:08 AM, Staffan Tylen <sta...@gm...> wrote: Experience some strange behaviour it seems like the ListView (un)checkAll methods trigger the CheckBoxChanged event, is this true? If so is this really necessary? Without even looking at the code I would say yes that is true. Is it really necessary? I would say yes, that is what connecting the event is for. If you don't want the event, don't connect it. Maybe there is something I don't understand about the question? -- Mark Miesfeld ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Oorexx-users mailing list Oor...@li... https://lists.sourceforge.net/lists/listinfo/oorexx-users ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Oorexx-users mailing list Oor...@li... https://lists.sourceforge.net/lists/listinfo/oorexx-users ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Oorexx-users mailing list Oor...@li... https://lists.sourceforge.net/lists/listinfo/oorexx-users |