Pozdrav,
postaviš TButton, recimo, i odradiš
OnClick:
Code:
...
var
Dlg: TForm;
Rslt: Integer;
begin
Dlg := CreateMessageDialog('Da li ste sigurni da zelite izaci iz programa?', mtWarning,
[mbYes, mbNo, mbCancel]);
{ change the messagedlg caption }
Dlg.Caption := 'Upozorenje!';
{change the button texts }
TButton(Dlg.FindComponent('Yes')).Caption := 'Da';
TButton(Dlg.FindComponent('No')).Caption := 'Ne';
TButton(Dlg.FindComponent('Cancel')).Caption := 'Odustajem';
Rslt := Dlg.ShowModal;
Case Rslt of
2: ;
6: Form1.Close;
7: ShowMessage('Pa, ipak necu :D!');
end
...
Integer kodovi za dugmad:
Citat:
OK = 1
CANCEL = 2
ABORT = 3
RETRY = 4
IGNORE = 5
YES = 6
NO = 7
CLOSE = 8
IDHELP = 9
TRYAGAIN = 10
CONTINUE = 11
Someone's sitting in the shade today because someone planted a tree a long time ago.