Uncheck a CheckBox in Delphi

Posted on 2004-04-05
Last Modified: 2008-02-26

I have a form that has six checkbox's on it.If a user has checked some box's and then
clicks on another button that prints a form. When the program
has finished printing  it goes back to that form and automatically unchecks the box's
without the user having to do it.
I also have text box's and combo box's but I don't want to clear them.

I am using Delphi 7.

Your help would be appreciatted !!

Question by:delphimate
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Assisted Solution

PerryDK earned 50 total points
ID: 10762845
Can you provide some code to help narrow the problem down.

I'd first check in your onClick event handler for printing of the form.
Check all code inside of it and all procedures that it calls.
More than likely somewhere in that code TCheckBox.Checked := false; is being called on your check boxes.

The other possibility is that the form that displays the settings is getting deleted and then being recreated again with the default form settings.  In that case you will have to provide a means of saving the forms setting and then restoring them later.
LVL 11

Accepted Solution

calinutz earned 200 total points
ID: 10763582
Do you print using a QuickReport? If you do then you can use the AfterPrint event of the QuickReport. And place there the code that unchecks the CheckBoxes

Author Comment

ID: 10772946

Thanks calinutz,that was an easy solution


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question