Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-09

MessageDlg() can't return a mbHelp result

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Has anybody actually noticed that MessageDlg() can define the mbHelp button as one of the displayed buttons, but can't return the mbHelp button as a result, because DialogResults() has it commented out (or rather defined as mrNone)!!

Regards,
- Graeme -

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 6 lines
Hi, Has anybody actually noticed that MessageDlg() can define the mbHelp button as one of the displayed buttons, but can't return the mbHelp button as a result, because DialogResults() has it commented out (or rather defined as mrNone)!!

Delphi invokes the help system when a mbHelp button is pressed, so a help button does not need a return value.
That's why there is no mrHelp.

I added a comment to DialogResults.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner
Mattias Gaertner wrote
Delphi invokes the help system when a mbHelp button is pressed, so a help button does not need a return value. That's why there is no mrHelp.

OK, thanks for the info.

So does LCL behave the same as VCL in this instance? Does LCL's MessageDlg() also invoke the help system? If not, wouldn't it be useful to return mrHelp, so the developer could manually invoke the help system after observing the MessageDlg() result?

Regards,
- Graeme -

Reply by email

Bart
to Graeme Geldenhuys
Graeme Geldenhuys wrote 15 lines
So does LCL behave the same as VCL in this instance? Does LCL's MessageDlg() also invoke the help system? If not, wouldn't it be useful to return mrHelp, so the developer could manually invoke the help system after observing the MessageDlg() result? Regards, - Graeme - -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

The MessageDlg is supposed to be compatible with Delphi. Clicking on "Help" should not close this dialog, hence the button needs to have ModalResult = mrNone.

I don't know if we have the mechanismes to open help if "help" is clicked. Even in Delphi this (implementing help) was beyond me ...

Bart

Reply by email