Re: how to simulate a ctrl+clic
I am going to use a grid instead of the listbox As far as I am concerned, this is the best approach. You can put the grid on a form, to be called when you need to make a selection. Appropriate code in the click event of the checkboxes on the grid would enable the user to select or deselect. You can add buttons on the form to select all, deselect all, revert selections (select a couple of records, then change your mind and select the rest of the records but the couple selected before, you name it..). The form would only appear when you need it and disappear after you made all the selections. Comboboxes are suitable for the selection of a few records, but are cumbersome to use, IMHO. Grids, instead, are superb!! Rafael Copquin ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/533d5e2f.8040...@fibertel.com.ar ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
At 22:21 2014-04-02, Jean MAURICE jsm.maur...@wanadoo.fr wrote: Hi Paul, selecting all the pupils is not the problem. The issue I want to avoid is : the operator has deselected 2 pupils and when he/she want to deselect the third one he/she forgets the CTRL Key and then all pupils are deselected and he/she must redo the work ... it's not a big problem but just an annoying one ! I am going to use a grid instead of the listbox You could use two listboxes. One would start with a list of the pupils; the other would start empty. Select a pupil name and click on a move button to move the name to the other listbox. When done selecting, click on another button to process. Sincerely, Gene Wirchenko ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/ ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
Hi Gene, that's right and I already use this features in some places. But as I started again with a grid ... Thanks anyway. The Foxil ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/533db6ce.8040...@wanadoo.fr ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
Check out the Picker class which does exactly that - it's a bit complicated but in the past I've used a stripped down version of the code to build e.g. a query generator. On 04/04/2014 00:34, Gene Wirchenko wrote: At 22:21 2014-04-02, Jean MAURICE jsm.maur...@wanadoo.fr wrote: snip You could use two listboxes. One would start with a list of the pupils; the other would start empty. Select a pupil name and click on a move button to move the name to the other listbox. When done selecting, click on another button to process. Sincerely, Gene Wirchenko [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/533e303a.7060...@hawthorncottage.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
You have four parameters in the MouseDown Event, the nShift allow u to check for the CTRL key. I prefer the KeyPress event. E. On Wednesday, April 2, 2014 2:11 AM, Jean MAURICE jsm.maur...@wanadoo.fr wrote: Hi, I have to work on all the pupils in a classroom but one or two. So I built a listbox with the name of all the pupils (about 35). In the init of the listbox, I 'select' all the lines. If I ctrl+clic on a pupil, it becomes unselected and selected again if I redo the ctrl-clic. It's exactly what I want. It works great. But if I forgot to press the CTRL key (and it will happen very often), all the pupils become unselected at the same time and it is unbearable. I didn't find a mean to 'simulate' the CTRL key in the click event or the mousedown event ! Have you an idea ? TIA The Foxil [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1396437354.90161.yahoomail...@web163403.mail.gq1.yahoo.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
But if I forgot to press the CTRL key (and it will happen very often), all the pupils become unselected at the same time and it is unbearable. I didn't find a mean to 'simulate' the CTRL key in the click event or the mousedown event ! Have you an idea ? Well, off the top of my head (mostly because I can't test it here at the moment): Will nodefault prevent the issue? Either in keypress, click, or mousedown? If so, you can use the nShift (the second one, if I remember right) parameter of mousedown to detect whether the Control key is pressed. I'm not sure if there's a way to simulate Control-Click, but you might be able to use Keyboard {CTRL+SPACEBAR} to effectively do the same thing. Alternatively, code to detect a keypress combination (Control-A, for example), that just resets all of the pupils to selected again. If you only need to deselect a couple of students and you screw up, you just hit Control-A and be more careful next time. Joel ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CC00D752DB174D79949D32C942223727@ASUS1 ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
But if I forgot to press the CTRL key (and it will happen very often), all the pupils become unselected at the same time and it is unbearable. I didn't find a mean to 'simulate' the CTRL key in the click event or the mousedown event ! Have you an idea ? Rather than change the way standard interface items work (admittedly, in this case, more difficult than they should), how about some other work arounds: 1) Add a 'Select All' button near the list box so you can reset them all to be selected and then de-select again. 2) Change the listbox to a grid with a first column of a checkbox so you can select/de-select with just a click, rather than control-click, and don't have to mess with the range features. 3) Enable the system edit menu (untested) or capture the Ctrl-A shortcut when focus is on the listbox to enable the 'Select All' feature. -- Ted Roche Associates, LLChttp://www.tedroche.com/ ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/533c1451.3000...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
Hi Ted, I tried the MOUSE command but with no success (in english it seems to be 'cyclic redundancy'). So I am going to use a grid ... Thanks The Foxil ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/533c15d1.5020...@wanadoo.fr ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
- Original Message - From: Jean MAURICE jsm.maur...@wanadoo.fr To: ProFox Email List profox@leafe.com Sent: Wednesday, April 02, 2014 7:11 AM Subject: how to simulate a ctrl+clic Hi, I have to work on all the pupils in a classroom but one or two. So I built a listbox with the name of all the pupils (about 35). In the init of the listbox, I 'select' all the lines. If I ctrl+clic on a pupil, it becomes unselected and selected again if I redo the ctrl-clic. It's exactly what I want. It works great. But if I forgot to press the CTRL key (and it will happen very often), all the pupils become unselected at the same time and it is unbearable. I didn't find a mean to 'simulate' the CTRL key in the click event or the mousedown event ! Have you an idea ? TIA The Foxil Hello Jean. Instead of firing out the whole concept of Windows and its basic functions accepted by our world, would it not make more sense to simply add a button for reversing the active selection ? You can't predict in advance whatever the crap your users will find ; it will always be bad for you, you know ? Have you to subscribe to all foolish demands, even the most improbable? I think there's no problem about your project, it is not a development issue, but a basic windows training problem. Gérard. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/35532265B27F4DE4843D6219E18C3A0C@MuriellePC ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: how to simulate a ctrl+clic
Jean What you could do is put the following in the RightClick method and right click the list when you want to select all the items For n = 1 This.ListCount This.Selected(n) = .T. EndFor Paul Newton -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Jean MAURICE Sent: 02 April 2014 06:11 To: profoxt...@leafe.com Subject: how to simulate a ctrl+clic Hi, I have to work on all the pupils in a classroom but one or two. So I built a listbox with the name of all the pupils (about 35). In the init of the listbox, I 'select' all the lines. If I ctrl+clic on a pupil, it becomes unselected and selected again if I redo the ctrl-clic. It's exactly what I want. It works great. But if I forgot to press the CTRL key (and it will happen very often), all the pupils become unselected at the same time and it is unbearable. I didn't find a mean to 'simulate' the CTRL key in the click event or the mousedown event ! Have you an idea ? TIA The Foxil [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/9a8106afb0ef9b44b69045c4448935a2506f0...@nlbawexmbx1.infor.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: how to simulate a ctrl+clic
Hi Paul, selecting all the pupils is not the problem. The issue I want to avoid is : the operator has deselected 2 pupils and when he/she want to deselect the third one he/she forgets the CTRL Key and then all pupils are deselected and he/she must redo the work ... it's not a big problem but just an annoying one ! I am going to use a grid instead of the listbox Best Regards The Foxil ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/533cefd8.3090...@wanadoo.fr ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.