delphi中 Exclude的用法!?
1个回答
展开全部
参数:
procedure Exclude(var S: Set; I: Ordinal);
下边实例取自Delphi XE帮助文档!
procedure TOptionsForm.btShowMessageClick(Sender: TObject);
begin
//Creates a Message Dialog with the Selected Buttons.
MessageDlg('Hello World!', mtInformation, FMsgButtons, 0);
end;
procedure TOptionsForm.CheckBoxClick(Sender: TObject);
begin
{ Check wether an option is selected and add an element into a set,
or exclude it from the set. }
if cbYes.Checked then
Include(FMsgButtons, mbYes)
else
Exclude(FMsgButtons, mbYes);
if cbNo.Checked then
Include(FMsgButtons, mbNo)
else
Exclude(FMsgButtons, mbNo);
if cbCancel.Checked then
Include(FMsgButtons, mbCancel)
else
Exclude(FMsgButtons, mbCancel);
end;
procedure Exclude(var S: Set; I: Ordinal);
下边实例取自Delphi XE帮助文档!
procedure TOptionsForm.btShowMessageClick(Sender: TObject);
begin
//Creates a Message Dialog with the Selected Buttons.
MessageDlg('Hello World!', mtInformation, FMsgButtons, 0);
end;
procedure TOptionsForm.CheckBoxClick(Sender: TObject);
begin
{ Check wether an option is selected and add an element into a set,
or exclude it from the set. }
if cbYes.Checked then
Include(FMsgButtons, mbYes)
else
Exclude(FMsgButtons, mbYes);
if cbNo.Checked then
Include(FMsgButtons, mbNo)
else
Exclude(FMsgButtons, mbNo);
if cbCancel.Checked then
Include(FMsgButtons, mbCancel)
else
Exclude(FMsgButtons, mbCancel);
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询