Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TAdvSmoothMessageDialog
Using the Execute & ExecuteDialog function

The TAdvSmoothMessageDialog has an Execute and ExecuteDialog function. The ExecuteDialog function returns a TModalResult. The Execute function returns a Boolean and this Boolean is only true when the ModalResult is mrOk or mrYes. When adding buttons and using the Execute function, make sure that there is a button with the ButtonResult mrOk or mrYes.

AdvSmoothMessageDialog1.Buttons.Clear; 
AdvSmoothMessageDialog1.Position := poScreenCenter; 
with AdvSmoothMessageDialog1.Buttons.Add do 
begin 
  ButtonResult := mrOk; 
  Caption := 'Ok'; 
end; 
with AdvSmoothMessageDialog1.Buttons.Add do 
begin 
  ButtonResult := mrCancel; 
  Caption := 'Cancel'; 
end;
 
if AdvSmoothMessageDialog1.Execute then 
  Label1.Caption := 'Ok Button clicked';