Michael Van Canneyt wrote:


On Mon, 5 Sep 2005, Mattias Gaertner wrote:

On Mon, 5 Sep 2005 17:04:04 +0200 (Romance Daylight Time)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:



On Mon, 5 Sep 2005, Alexsander Rosa wrote:

After years of development with this kind of dialog box (with a
caption, a message ending with a question and buttons labeled Yes, No,
Cancel etc), I've noticed than most non-tech users actually do not
READ the message, they just read the labels of the buttons and click
Yes or No (rarely Cancel), almost automatically - no thinking at all.

I did some GUI and usability research and found that many experts
suggest that the labels of the buttons should state the action that
will be performed. IIRC, Open Office dot Org does that: when you try
to exit when the text has changed, instead of the classic "Save
changes?" (Yes, No, Cancel) it says something like: "There are
changes." (Save, Discard, Cancel). The experience shows that users
read the buttons, not the message.

Of course it's simple to write such a dialog box, but it would be nice
to have it as a built-in feature, to educate new developers and create
a standard. This would also solve this language problem, as most text
would be provided - except, maybe, "Cancel", that could be defined
globally somewhere or at least have a default text.


I think this can be easily implemented as an overloaded form of
MessageDLG, where instead of [mbOK,mbCancel] you pass the captions of
the buttons.


Sounds like
QuestionDlg


Fine too :)



MessageDLg('File has changed. Save Changes?',MB_WARNING,['&Save','&Don''t
save','&Cancel'],0)

The first button is the default button, and the function returns the index
of the pushed button, or -1 if the dialog was closed by closing the
window.


Example:
QuestionDlg('File has changed. Save
Changes?',mtError,[mrYes,mrCancel,'Cancel now',mrIgnore,300,'Sophisticated
Save'],0);


I would only allow strings. But maybe I miss the point of your proposal ?

One problem I see with strings only are defaut "OS/widgetset" buttons.
On gnome you have default glyphs for default buttons. If only strings are passed, there is no way to find out what glyph to use (or they have to be given through a second array)

Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to