|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
I had a few ideas for Dialogs.. (I use Dialog Studio) ok..
[*]First of all, I was wondering if there was an option to disable the "X" in dialogs, It would be nice if that was possible.
[*]Second, I was wondering if there were something to add colors to a dialog, sort of like the "CTRL + K" box?
[*]And last, it would also be nice if we could change fonts in dialogs as well.
Anyone think any of these are good ideas? Please give your opinions.
-Kurdish_Assass1n
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null
For colors and fonts, I believe (although I haven't used these myself) that DCX & MDX both support these options for dialogs.
|
|
|
|
Joined: Apr 2004
Posts: 218
Fjord artisan
|
Fjord artisan
Joined: Apr 2004
Posts: 218 |
I like the first idea of maybe a mode to hide the "[X]" button on dialogs.
Live to Dream & Dream for Life
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Nice ideas, but extra dialog features have been suggested many many times and not much has happened. I wouldn't get your hopes up.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null
For colors and fonts, I believe (although I haven't used these myself) that DCX & MDX both support these options for dialogs. yea, I think it does as well, the problem is that I make dialogs when needed, like, In most cases, I give them out, and, if I wanted to add color, I wouldn't want to have to give the the dll, and the other scripting, because, I tried DCX yesterday, (I think that was it) and it had a few dlls, and a lot of files/folders, and, I wouldn't want to give that out, it also had a lot of custom identifiers, so, it would be nice if we could get that as well.
-Kurdish_Assass1n
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
You only need the DCX.dll and copy paste the DCX/XDIALOG/XDID aliases from the dcx_tools.mrc to make DCX work.
$maybe
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null
Hey Russel, can you please explain this a little more, I'm wanting to disable the 'X' in dialogs.
-Kurdish_Assass1n
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
dialog new_table {
title "New Project"
size -1 -1 124 94
option pixels
button "OK", 1, 15 15 75 25, ok
button "Cancel", 2, 15 45 75 25, cancel
}
menu * {
New Table : dialog $iif(!$dialog(new_table),-md,-ev) new_table new_table
}
on *:dialog:new_table:close:*:{
echo 4 -a $iif($did,$did,NULL)
}
If you click the OK button, then the script echoes 1 If you click the Cancel button, then the script echoes 2 If you click the X, then the script echoes 2 If you remove the line with the Cancel button in it, then run the script and click the X, you'll see NULL I hope this is sufficient explanation for your requirements.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2006
Posts: 400 |
I'm talking about disabling the 'X' here's an example: I'm wanting to do the same thing as the disabled button, to the X button, either that, or hide it, where they can't click it, I hope I explained it better.
-Kurdish_Assass1n
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I understand, and while at the moment I can't see an advantage to having that, I also can't see a disadvantage either. In any case, until (and if) this is implemented, a non-perfect workaround could look like dialog new_table {
title "New Project"
size -1 -1 124 94
option pixels
button "OK", 1, 15 15 75 25, ok
button "Cancel", 2, 15 45 75 25, cancel
}
menu * {
New Table : dialog $iif(!$dialog(new_table),-md,-ev) new_table new_table
}
on *:dialog:new_table:close:*:{
if !$did {
dialog -md new_table new_table
}
}
|
|
|
|
Joined: Apr 2006
Posts: 24
Ameglian cow
|
Ameglian cow
Joined: Apr 2006
Posts: 24 |
First of all, I was wondering if there was an option to disable the "X" in dialogs, It would be nice if that was possible. I think that is a really bad idea. Not giving users a way out is bad. Think of a dialog where there is no button (or a button that does nothing), and thus no way to get rid of it since the X is not there. The malicious use for this is just too high.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Anyone that creates a dialog that doesn't have a way of closing it, shouldn't be coding dialogs for others to use. I, for one, have never seen a dialog that has been scripted for someone else to use that hasn't contained a Cancel button. It's one of the easiest pieces of a dialog to code.
|
|
|
|
Joined: Apr 2006
Posts: 24
Ameglian cow
|
Ameglian cow
Joined: Apr 2006
Posts: 24 |
You are thinking benevolently. Think maliciously.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I'm thinking realistically based upon my knowledge of dialogs (or as realistically as I can for 1:40 am)
|
|
|
|
Joined: Apr 2006
Posts: 24
Ameglian cow
|
Ameglian cow
Joined: Apr 2006
Posts: 24 |
Maybe I'm just a bit more paranoid than the average dialog user. /me looks at the RSS feeds of Secunia, Netcraft, SecurityFocus.
|
|
|
|
Joined: Jul 2003
Posts: 655
Fjord artisan
|
Fjord artisan
Joined: Jul 2003
Posts: 655 |
I can not see the harm in having a flag that creates the dialog without the [x] in the corner, but i would definately insist on 1 condition. Using the flag to hide the [x] should NOT render the [esc] key unable to escape out of the dialog.
I know there are other ways people could render a dialog unclosable, but they would require more effort, and to be honest i really dont see much of a reason somebody with mal-intentions would choose to spend their time on such a trivial thing when they could just do whatever they intend in the background.
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
The malicious use for this is just too high. Why? Scripts can run regardless of whether or not there's a close button. Remember that closing the dialog will trigger a script, so what if that is the malicious one?
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
theres always the alternative of using a dialog framed @window. that can run with no[x]
also, dcx can make dialogs with no titlebar/[x] etc.
btk
billythekid
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Alternative to the "malicious" nature (of which i see VERY minimal; as hixxy pointed out, scripts can be done with or without a gui), the ability to remove the [X] perhaps in the presence of a cancel button would be nice.
-KingTomato
|
|
|
|
|