The complexity of Controls' Events (1 Viewer)

Sun_Force

Active member
Local time
Today, 21:17
Joined
Aug 29, 2020
Messages
396
One thing I do a lot is change a button immediately after its click event.
1) enabled=false
2) italic=true
3) caption="Please wait, processing..."
(change it back at the end).

Nice visual cue to the user, especially users who are power clickers.
I like the idea. I may use it for the next assignment. If it's OK....
(though we've been strictly asked to use our own ideas....Receiving hints and help to achieve our goals is OK, but copying the whole work is not allowed)
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 08:17
Joined
May 21, 2018
Messages
8,529
I do the same in most of my DBs. I use a textbox and set the value to =SomeCaption. This way it can be active control and you can use a single function instead of writing lots of event procedures.. Then I set the tag property to the sort string. Usually this is more than just the primary field because most times it may not make much sense not to have additional fields sorted if you sort by the clicked field.. Something like "OrderNo, DrawingNo,...". Whe they click check if DESC follows OrderNo if not add DESC else use the tag by itself.
As pointed out no control I know of can do both the single and double click. But you can use a mouse down instead of the click event. Then you can capture something like a shift or a right mouse (have to disable the menu though). In a recent thread I suggested t that so they had a normal mouse down and a shift mouse down do different things. It worked well.

You could also make this a 3 way click. Asc, Desc, back to default. Not sure if that is any simpler.
 

Sun_Force

Active member
Local time
Today, 21:17
Joined
Aug 29, 2020
Messages
396
As pointed out no control I know of can do both the single and double click.
Wrong.
Lables can and I used them as I explained above. If you accept a label as a control.


I tested it again. seems that you're right. But I swear last night I could double click a label. (maybe it was a dream. Not sure anymore)

But you can use a mouse down instead of the click event.
@MajP you're a genius. Never thought about that. a very clever idea. thanks
 
Last edited:

Mike Krailo

Well-known member
Local time
Today, 08:17
Joined
Mar 28, 2020
Messages
1,044
Yes he is. I was the one in the recent thread he referred to. In my case it would have been nice to have both double and single click events on one button since the button was part of a calendar. MajP suggested using mouse down event and that solved the problem. It's relatively easy to click or Ctrl-Click a button.
 

Isaac

Lifelong Learner
Local time
Today, 05:17
Joined
Mar 14, 2017
Messages
8,777
I like the idea. I may use it for the next assignment. If it's OK....
(though we've been strictly asked to use our own ideas....Receiving hints and help to achieve our goals is OK, but copying the whole work is not allowed)
I don't care what anyone does with any of my ideas. It's exclusively your decision.
 

Mike Krailo

Well-known member
Local time
Today, 08:17
Joined
Mar 28, 2020
Messages
1,044
This entire forum is a plethora of ideas. Give credit where credit is due or required but I cannot imagine getting anything done without using code snippets that just work. If you design for reusability, then those type of modules are useful in many projects, not just one. Try not to hard code data in your programming in favor of variables and functions (reusable code snippets). I believe MajP uses that philosophy.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:17
Joined
Feb 19, 2002
Messages
43,293
You may prefer the look of a continuous form or maybe you need that format because you want to have a button or option group on each row but the DS view gives a huge added value in sorting and filtering without code.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:17
Joined
Feb 19, 2013
Messages
16,616
DS view gives a huge added value in sorting and filtering without code.
you can sort and filter continuous and single forms without code as well - just right click on a bound control. For me, benefit of DS is you can change column widths/order and also freeze columns
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 08:17
Joined
May 21, 2018
Messages
8,529
If working with DS this is an invaluable resource. There are a lot of features of the DS that are not easily exposed and some are not documented.


I did notice that these features now come up in intellisense, but if I remember correctly many of these properties did not previously appear.
 

Users who are viewing this thread

Top Bottom