Index
2014-04-02 00:11 – Jean MAURICE : how to simulate a ctrl+clic
2014-04-02 01:09 – Joel Fischoff : Re: how to simulate a ctrl+clic
2014-04-02 06:15 – Eurico Chagas Filho : Re: how to simulate a ctrl+clic
2014-04-02 08:44 – Ted Roche : Re: how to simulate a ctrl+clic
2014-04-02 08:51 – Jean MAURICE : Re: how to simulate a ctrl+clic
2014-04-02 08:58 – Gérard Lochon : Re: how to simulate a ctrl+clic
2014-04-02 10:23 – Paul Newton : RE: how to simulate a ctrl+clic
2014-04-03 00:21 – Jean MAURICE : Re: how to simulate a ctrl+clic
2014-04-03 08:12 – Rafael Copquin : Re: how to simulate a ctrl+clic
2014-04-03 14:04 – Gene Wirchenko : Re: how to simulate a ctrl+clic
Back to top
how to simulate a ctrl+clic

Author: Jean MAURICE

Posted: 2014-04-02 00:11:04   Link

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

_______________________________________________

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/533B9BE8.6070804@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.

©2014 Jean MAURICE
Back to top
Re: how to simulate a ctrl+clic

Author: Joel Fischoff

Posted: 2014-04-02 01:09:21   Link

>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.

©2014 Joel Fischoff
Back to top
Re: how to simulate a ctrl+clic

Author: Eurico Chagas Filho

Posted: 2014-04-02 06:15:54   Link

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.maurice@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.YahooMailNeo@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.

©2014 Eurico Chagas Filho
Back to top
Re: how to simulate a ctrl+clic

Author: Ted Roche

Posted: 2014-04-02 08:44:49   Link

>> 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, LLC http://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.3000209@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.

©2014 Ted Roche
Back to top
Re: how to simulate a ctrl+clic

Author: Jean MAURICE

Posted: 2014-04-02 08:51:13   Link

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.5020304@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.

©2014 Jean MAURICE
Back to top
Re: how to simulate a ctrl+clic

Author: Gérard Lochon

Posted: 2014-04-02 08:58:44   Link

----- Original Message -----

From: "Jean MAURICE" <jsm.maurice@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.

©2014 Gérard Lochon
Back to top
RE: how to simulate a ctrl+clic

Author: Paul Newton

Posted: 2014-04-02 10:23:00   Link

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-bounces@leafe.com] On Behalf Of Jean MAURICE

Sent: 02 April 2014 06:11

To: profoxtech@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/9A8106AFB0EF9B44B69045C4448935A2506F04B7@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.

©2014 Paul Newton
Back to top
Re: how to simulate a ctrl+clic

Author: Jean MAURICE

Posted: 2014-04-03 00:21:28   Link

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.3090808@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.

©2014 Jean MAURICE
Back to top
Re: how to simulate a ctrl+clic

Author: Rafael Copquin

Posted: 2014-04-03 08:12:15   Link

>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.8040700@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.

©2014 Rafael Copquin
Back to top
Re: how to simulate a ctrl+clic

Author: Gene Wirchenko

Posted: 2014-04-03 14:04:31   Link

At 22:21 2014-04-02, Jean MAURICE <jsm.maurice@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.

©2014 Gene Wirchenko