Hi,
If I have the following code:
procedure TMain.Form1Show(Sender: TObject);
var
dlg:TMessageDlg;
button:TCustomDialogButton;
begin
dlg:=TMessageDlg.Create(Self);
button:=dlg.CustomButtons.Add;
button.Caption:='A Button';
button.ElementClassName:='btn btn-primary';
dlg.Show;
end;
A button is produced with the text as specified. I have a few questions about the functionality of the TCustomDialogButton:
- What does the ElementClassName property do? My thought was it would allow fine grain styling of the custom button but this does not happen.
- How does one set the modal result of the button? I can't see anyway of doing this.
- Not so much a question but I noticed that the HTML ID of the button is set as whatever the caption is. Is it possible/would it be possible to set the ID of the button as a property instead?
Thanks!