Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

LMDTaskDialog

Hi

Where can I find an example on how to use the LMDTaskDialog ?

Thank you

Comments

  • 10 Comments sorted by Votes Date Added
  • Hi


    bExit :=LMDTaskDialog1.Execute  ;

    if bExit then ShowMessage('OK') else ShowMessage('no');

    Why is bExit True for both OK & No ?
  • Demo: Check then two available TaskDialog demos
    Second question: The return value tells you only that dialog was shown correctly. TaskDialog can have many different possible return values. Check the result properties instead:

        property ResultButtonId: Integer;
        property ResultRadioButtonId: integer;
        property ResultVerificationState: Boolean;

  • Hi Rafael

    Have just checked but there is no such TaskDialog Demos in the LMD SE :-(

    Can you assist ?

    Thank you.
  • Get a trial and extract demos from there. SE does not include demos. 
  • Hi Rafael

    I tried

    if LMDTaskDialog1.execute then
            ShowMessage(IntToStr(LMDTaskDialog1.ResultRadioButtonId)) ;

    The LMDTaskDialog1 has 2 buttons, Ok & Cancel. The return value is 0 for both buttons.

    I need to know which button is clicked to process the results of the btn click

    Thank you

  • TaskDialog Demo - cannot compile
    [Error] d_LMDTaskDlg.pas(157): Types of actual and formal var parameters must be identical
  • Please re-read your code snippet:

    if LMDTaskDialog1.execute then

            ShowMessage(IntToStr(LMDTaskDialog1.ResultRadioButtonId)) ;

    You want result of command buttons, not radio buttons. Use ResultButtonId instead. Return values are Modalresult values like mrOK for common buttons or userdefined values you have set in Buttons collection.

    Regarding demo problem:
    Most probably version mix up.


  • Hi Rafael

    if LMDTaskDialog1.execute then
            ShowMessage(IntToStr(LMDTaskDialog1.ResultButtonId))

    works :-) Yes returns 1 and No returns 7

    Thanx
  • You should not use 1 or 7. Use the corresponding Modalresult identifiers (mrYes, mrNo, mrCancel, mrOk etc.).
Sign In or Register to comment.