No-button for user interaction
-
Stef123
No-button for user interaction
Feedback is often required as a Yes/No answer. I tried "msg" and "confirm" - but both default to CANCEL - too confusing in the usual Windows convention that implies "neither Yes nor No, just abort and continue where I was last"
How do I turn the Cancel-text on those controls into "No"?
How do I turn the Cancel-text on those controls into "No"?
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: No-button for user interaction
You got a sympathizer in me: http://www.xyplorer.com/xyfc/viewtopic. ... 57#p108725
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
PeterH
- Posts: 2827
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: No-button for user interaction
But doesn't press 'Escape key' mean 'Cancel', and have the same result as clicking the 'Cancel button'?
Then 'Cancel' (by key) would mean 'No'? I.e. the meaning would not be as clear as for 'Cancel', I think.
Then 'Cancel' (by key) would mean 'No'? I.e. the meaning would not be as clear as for 'Cancel', I think.
-
admin
- Site Admin
- Posts: 66256
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: No-button for user interaction
Next beta:Stef123 wrote:Feedback is often required as a Yes/No answer. I tried "msg" and "confirm" - but both default to CANCEL - too confusing in the usual Windows convention that implies "neither Yes nor No, just abort and continue where I was last"
How do I turn the Cancel-text on those controls into "No"?
Code: Select all
syntax: confirm(text, [linebreaker="<br>"], [DefaultButton=1], [buttons=1])vbOKCancel = 1, vbYesNoCancel = 3, vbYesNo = 4
Example:
Code: Select all
msg confirm("Ok?", , , 4);FAQ | XY News RSS | XY X
-
Stef123
Re: No-button for user interaction
Thank you. Exactly what I was hoping for.admin wrote: vbOKCancel = 1, vbYesNoCancel = 3, vbYesNo = 4
Your feedback and implementation speed seems to have been raised by yet another notch
Correct. And the very reason I was not satisfied with having "Cancel" only.PeterH wrote:But doesn't press 'Escape key' mean 'Cancel', and have the same result as clicking the 'Cancel button'?
The other way round: the meaning of Cancel is not as clear as No.PeterH wrote:Then 'Cancel' (by key) would mean 'No'? I.e. the meaning would not be as clear as for 'Cancel', I think.
Or rather - it's two different things. Open Word, type something, exit Word. It will ask you whether you want to save the changes. NO will exit without saving, but Cancel will cancel the exit-operation and keep you inside Word.
-
PeterH
- Posts: 2827
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: No-button for user interaction
I meant it the other otherStef123 wrote:The other way round: the meaning of Cancel is not as clear as No.PeterH wrote:Then 'Cancel' (by key) would mean 'No'? I.e. the meaning would not be as clear as for 'Cancel', I think.
Or rather - it's two different things. Open Word, type something, exit Word. It will ask you whether you want to save the changes. NO will exit without saving, but Cancel will cancel the exit-operation and keep you inside Word.
(Imagine question: "Skip deleting files? Yes/No" - Esc pressed)
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: No-button for user interaction
I have a similar problem in many scripts, most recently in xyskinner.
At one point the script asks if you want to save before restart or not. Because it's about to restart XY, users might justifiably assume pressing cancel here means cancelling the script/restart.
I had to explicitly describe what Cancel does, creating a larger than necessary messagebox in the process.
This is going to be a very welcome feature.
Thanks Don. Have a nice stay on the comet!
At one point the script asks if you want to save before restart or not. Because it's about to restart XY, users might justifiably assume pressing cancel here means cancelling the script/restart.
I had to explicitly describe what Cancel does, creating a larger than necessary messagebox in the process.
This is going to be a very welcome feature.
Thanks Don. Have a nice stay on the comet!
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Stef123
Re: No-button for user interaction
Hm, I am not so sure about ESC always being equal to Cancel. In dialogs that have two buttons only, I've come to expect ESC to trigger the "other" button that is not focused by default. ENTER being on one end of the "continuum" so to speak, and ESC being on the other.PeterH wrote:Esc is the Cancel key. What does it do if selections of Yes and No are available?
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: No-button for user interaction
Cool.
Will the buttons be translate-able or do they are totally Windows-owned?
Will the buttons be translate-able or do they are totally Windows-owned?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
admin
- Site Admin
- Posts: 66256
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: No-button for user interaction
Newbies seeing this can resource to a code like:
-as you can figure, everything can be customized both for echo'es() and input().
Code: Select all
$choice = input("Continue?", "Yes, you can...<crlf>Set 1 for YES-sim<crlf>Set 2 for NO-não<crlf>Set 3 for CANCEL-cancelar", 1, );
if($choice == 1) {
echo "Pressed YES.";
}
if($choice == 2) {
echo "Pressed NO.";
}
if($choice == 3) {
echo "Pressed CANCEL.";
}
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
Stef123
Re: No-button for user interaction
Thanks Sky,
very useful indeed, this kind of "recipe modules" for newbies like me. And fun too, leads to results quickly enough to keep you motivated (compared to the somewhat dreary "echo hello world" stuff that always kept me wondering what the heck I'd ever need it for)
very useful indeed, this kind of "recipe modules" for newbies like me. And fun too, leads to results quickly enough to keep you motivated (compared to the somewhat dreary "echo hello world" stuff that always kept me wondering what the heck I'd ever need it for)
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: No-button for user interaction
echo "You're welcome!<crlf 2>; )";
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
XYplorer Beta Club