全局变量 var LastOxButton: TOxButton = nil;TOxButton的OnClick if Assigned(LastOxButton) then LastOxButton.Color := ...; (Sender as TOxButton).Color := ...; LastOxButton := Sender as TOxButton;或者 TOxButton.Click过程中 if Assigned(LastOxButton) then LastOxButton.Color := ...; Self.Color := ...; LastOxButton := Self;
var LastOxButton: TOxButton = nil;TOxButton的OnClick
if Assigned(LastOxButton) then LastOxButton.Color := ...;
(Sender as TOxButton).Color := ...;
LastOxButton := Sender as TOxButton;或者 TOxButton.Click过程中
if Assigned(LastOxButton) then LastOxButton.Color := ...;
Self.Color := ...;
LastOxButton := Self;