Hi, all.

Steve wrote:
> >I think all those boxes should have yes/no/cancel buttons even if
> >cancel does the same as no.  :-)
>
> Gidday Rohit - must visit you again soon.
>
> Yes, we do mostly - when it suits to have a way out like that. In
> some circumstances though you need the user to think (yea, I
> know...) about the decision.
>
> Actually we only needed to change about a dozen or so anyway.
> Most were written correctly.

I haven't been following this thread that closely but is there a
reason you can't just use tests that always test against explicit mrYes?

Seeing as clicking the [x] box returns a ModalResult of 0 (from memory),
it's still a distinct value different from mrYes.

> We did spend a lot of time trying to figure out how we could get
> rid of the [x] box though - can't. It's Delphi VCL code and
> although we could change it - it's not recomended and we would
> have to change it every time we reloaded Delphi or upgraded.
>
> We also figured it wouldn't take much to write our own MessageDlg
> - but again we had to slap ourselves around the head a few times
> repeating "Don't re-invent the wheel" until we accepted what was
> given to us to work with.

IMO, that's a somewhat limiting attitude.

We decided to reimplement our own MessageDlgHtml so that we
could have Profax standard glyphs and keyboard handling on the buttons and
pass in
which button to focus and an optional HelpTopic for our HtmlHelp.

MessageDlg is a pretty small wheel and it's not at all hard to copy the code
and tweak it.

TTFN,
  Paul.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to