Scalabium Software

 

SMExport advertising

Knowledge for your independence.
 

 
Home Delphi and C++Builder tips


#12:How can I check a checkbox without triggering of OnClick event?

Sometimes it's necessary to change a state of TCheckBox component, but without operation of OnClick event. This task can be solved so:

{set a checked}
yourCheckBox.Perform(BM_SETCHECK, 1, 0);
{set a unchecked}
yourCheckBox.Perform(BM_SETCHECK, 0, 0);
or else in one procedure
procedure ChangeChecked(ACheckBox: TCheckBox; AState: Boolean);
begin
  ACheckBox.Perform(BM_SETCHECK, Ord(AState), 0);
end;
For example, if you will call the ChangeChecked(myCheckBox, True), then will be myCheckBox.Checked = True.
See also
 
MAPIMail
Fast Document Viewer
Database Information Manager
Paradox Viewer
Viewer for TNEF-files (winmail.dat)
ExcelFile Viewer
Metafile Convert
Excel Web-stream
Paradox to Text converter
SMMsg suite
 
 
Contact to webmaster

 

Borland Software CodeGear Embarcadero Technologies Scalabium Delphi tips

Copyrightc 1998-2012, Scalabium Software. All rights reserved.
webmaster@scalabium.com

August 12, 1999

SMReport Autogenerated