Page Index Toggle Pages: [1] 2 3  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) "Click only" command buttons" (Read 5366 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
"Click only" command buttons"
Aug 23rd, 2006 at 4:36pm
Print Post Print Post  
Is there a way to make a command button activate ONLY if it clicked with the mouse (as opposed to using the "Enter" key to navigate around the form?)
  

**
Captain Infinity
Back to top
IP Logged
 
carsten
Junior Member
**
Offline


Carpe Diem

Posts: 74
Location: Germany
Joined: Aug 24th, 2005
Re: "Click only" command buttons"
Reply #1 - Aug 23rd, 2006 at 6:20pm
Print Post Print Post  
Maybe it does help if you place all your command buttons at the end of the execution sequence. This way the user will only run into them once he has completed the entire form and needs to use the mouse to press a button beforehand.

Carsten
  

Carsten&&The Houseman&&"Smiling improves your face value"&&"A Clean House is a Sign of a Wasted Life"&&"Rather Big and Hard then Micro and Soft"
Back to top
 
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: "Click only" command buttons"
Reply #2 - Aug 23rd, 2006 at 6:30pm
Print Post Print Post  
I suppose I could do that, but it will break up the visual rhythm of my form (I have "delete line" buttons at the end of each line of related elements).  My cow-orkers, used to using the Enter key to navigate around Q&A, will slam into these each time they pass through the line of elements, deleting all the entries they just made.  I'd like to make the buttons click-only, if possible.

I could also use Throwfocus but I've tried to avoid that as much as possible, as per Erika's training.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: "Click only" command buttons"
Reply #3 - Aug 23rd, 2006 at 6:52pm
Print Post Print Post  
You can use the navigation order dialog in SDesigner to place them at the end of the naviation order, and much less likely to be navigated through, without geographically moving them on your form.

I would also highly recommend that you discourage the use of Enter for navigation in general as part of your end user training. Try to encourage use of the arrow keys (up and down, in particular).
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: "Click only" command buttons"
Reply #4 - Aug 23rd, 2006 at 7:06pm
Print Post Print Post  
Thanks Mark, Navigation Order is something I haven't looked at before.  Looks very useful.

Why arrows, in particular?  I've strenuously taught my users not to use their arrows in Q&A (as then can then jump fields that contain programming) but to use Tab and Enter instead.  I have no problem teaching them new techniques, but old habits will be hard to break.  But anyway, are Up and Down better to use than Tab and Shift-Tab?  If so, why?

Thanks again!
  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: "Click only" command buttons"
Reply #5 - Aug 23rd, 2006 at 7:44pm
Print Post Print Post  
My experience has been that using TAB is more consistent with other Windows applications, and so is more "natural" . 

I generally train users to use Tab/Shift-Tab to move between form elements.  Arrows are usually reserved for editing movement within a form element.

I don't think there is any correct answer, but lots of reasons and examples for doing things the way you want. 

A term that is used in magician circles, "Using your favorite method........", may be appropriate here.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: "Click only" command buttons"
Reply #6 - Aug 23rd, 2006 at 7:46pm
Print Post Print Post  
The cursor keys, the page up, and page down keys, in particular were created for navigation. They have no other meaning, and their meaning is reasonably clear. Tab, on the other hand, has a dual meaning. It can mean insert the tab character here (ASCII 9), or it can mean navigate to the next field.

As such, it is inconsistent by its own definition. In a sense, it is a "stolen" key forced into navigational servitude.

Enter is not much better, whether labeled "Return" - meaning the navigational "return to start of line, on next line", or "Enter" which generally means "Enter the data, leaving the field or the form or the line or the ...".

Because of ambiguities like these, different GUIs do different things, when confronted with unclear keystrokes. Sesame's GUI library, prefers the clearer message of up/down/right/left. Unaltered, it would actually send the focus directionally. Unfortunately, some felt that the non-linear navigation, while extremely efficient and intuitive, would be unfamiliar to users not used to having the cursor go in the direction they point with arrow keys. So I altered it so the up and shift-tab do the same thing. Down and Tab are mildly different. Tab will, for example, navigate out of a multiline element, whereas down will navigate through it. In any case, this causes a semi-linear navigation model.

The reason Enter selects, is because some felt that the "spacebar" means of selection was obscure and that leaving it at that would cause people to "have to reach for their mouse".

My wife, who's expectations are less jaded by other programs, thought the Enter key should "Enter" (read "submit") the entire form, like it does on HTML forms using most browsers. Of course my wife once asked what the "F" as in "F10" stood for. I told her it stood for "Function" as in "Function Keys". She scowled and said, "I thought it stood for something else!"

That is, of course, a very common reaction when we show Sesame to non-Q&Aers.

I'm not sure how the navigational rules got set in Q&A. There are some peculiarities going forward versus going backwards versus using tab versus enter versus the arrow keys versus using the mouse. Never, in a GUI, count on the user visiting or not visiting any particular elements. Like a hard drive is more efficient than a tape drive, because it provides non-linear ("random") access to any point on the harddrive with having to touch all the points between current position and target position, a GUI provides non-linear access to the form.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: "Click only" command buttons"
Reply #7 - Aug 23rd, 2006 at 8:15pm
Print Post Print Post  
Thanks again, Mark, that's very informative (you too, Bob!)

Quote:
Never, in a GUI, count on the user visiting or not visiting any particular elements.


This is very much on my mind as I design this application.  I'm trying to make it so my users can start anywhere they want and go anywhere they like.  So I use "On Element Change" a LOT, with redundant recalculations occurring every time any of a certain number of elements change.  (My Global Code is STUFFED with subroutines.)

But I'd really like to make the command buttons inaccessible except for mouse-clicks.  Just in my own tests I found myself firing them off inadvertantly as I keystroked around the form.  With forced navigation I've put them at the bottom of the list, and I'm tossing in ThrowFocus statements as we speak to get the keyboard to hop over them.  So far so good, but I know what I'm doing.

But my users, they'll find a way.  I know they will.  Then the screaming will start.  And my whole day of surfing Fark.com will come to a screeching halt, dagnabbit!
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: "Click only" command buttons"
Reply #8 - Aug 23rd, 2006 at 8:57pm
Print Post Print Post  
Infinity,
You might try a different approach. Use more than one layer of buttons, where the first button causes the rest to be accessible, but is otherwise harmless.

Build a form similar to this one, where you have a box with your buttons on it at the very bottom of the form:


Now, put a button at the top of the form and label it appropriately. I used "Open Command Buttons" as my label. Set the new box, and the buttons on the box to be invisible.

Now put code similar to this in the On Form Open event:
Code
Select All
Visibility(LE4, 0) // the box
Visibility(One, 0) // My three buttons
Visibility(Two, 0)
Visibility(Three, 0)
Visibility(Close, 0)

YPos(LE4, 200)
YPos(One, 220)
YPos(Two, 220)
YPos(Three, 220)
YPos(Close, 260)

ForceRedraw()
 



Now put code like this in the "Open" Button's On Entry event
Code
Select All
Visibility(LE4, 1)
Visibility(One, 1)
Visibility(Two, 1)
Visibility(Three, 1)
Visibility(Close, 1)
ForceRedraw()
 



And code like this in the On Enter event for the "Close" Buttons
Code
Select All
Visibility(LE4, 0)
Visibility(One, 0)
Visibility(Two, 0)
Visibility(Three, 0)
Visibility(Close, 0)
ForceRedraw()
 



When the open button is pressed, your panel of buttons should appear


When the close button is pressed, it will go away and cannot be navigated to because all of the buttons are invisible. Basically a popup button bar.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: "Click only" command buttons"
Reply #9 - Aug 23rd, 2006 at 11:16pm
Print Post Print Post  
Inifinity,

Another way that might help is to make a tab element, leave it a single tab, eliminate the label, shrink it down to almost the size of your command button, put your command button on the tab, set back fill color to the same as your background, place it on your form exactly were you want the button.

To the average user they will see nothing different in or on your form, however when you enter data when you get to that section of the form the tab will get focus NOT the command button (so nothing happens) if you press enter again it goes to the next element without activating the command button. The user will have to use the mouse to select the command button.

This is probably considered unconventional and the Lantica team may say why this is a bad idea, (I would go by what they say)  however it does accomplish your goal.

Best of luck and keep us posted.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: "Click only" command buttons"
Reply #10 - Aug 23rd, 2006 at 11:19pm
Print Post Print Post  
I don't know about the rest of the team, but I think its a pretty good idea.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: "Click only" command buttons"
Reply #11 - Aug 24th, 2006 at 12:02am
Print Post Print Post  
This could be done if we had event like MouseClick vs. ElementEnter.  How about giving us more event triggers like I see in other programs like Access and Alpha and FileMaker?  Things like Mouse Left Click/Mouse Right Click/Mouse Hover/Mouse Click/DoubleClick/Mouse Move/Mouse Up/Mouse Down/On Delete/On Visible On/On Visible Off/Key Up/Key Down/KeyPress, etc.?  Would make Version 2 even betterer.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: "Click only" command buttons"
Reply #12 - Aug 24th, 2006 at 12:24am
Print Post Print Post  
Sesame 2.0 has:

On Form Delete
On Form Delete
On Reveal
On Hide
On Form Reveal
On Form Hide
On Draw
Universal Event

in addition to the events in 1.x.x. It also has a few event sttribute commands and functions for determining things like which mouse button was pressed and etc...

Many more events are likely to make the code hard to follow and somewhat fractured.

PS:
Infinity, if you got here by skipping earlier posts, go back and read Bob Scott's post. His idea works well for people navigating with Enter.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: "Click only" command buttons"
Reply #13 - Aug 24th, 2006 at 3:43am
Print Post Print Post  
Quote:
Try to encourage use of the arrow keys (up and down, in particular).


I have to agree with Bob Hansen regarding the use of TAB rather than the arrows. I used to use ENTER and the arrow keys in Q&A. But I have had to force myself to use TAB in Sesame, because on forms that have a combo box, using the down arrow to navigate ends up opening the combo box and changing the value, rather than moving past it.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: "Click only" command buttons"
Reply #14 - Aug 24th, 2006 at 12:44pm
Print Post Print Post  
Infinity, if you got here by skipping earlier posts, go back and read Bob Scott's post. His idea works well for people navigating with Enter.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send Topic Send Topic Print Print