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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This is about my first experience with programming Arduino.
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now