Solved

Uncheck a CheckBox in Delphi

Posted on 2004-04-05
3
2,570 Views
Last Modified: 2008-02-26
Hi,

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 !!

Regards
Bruce
0
Comment
Question by:delphimate
3 Comments
 
LVL 4

Assisted Solution

by:PerryDK
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.
0
 
LVL 11

Accepted Solution

by:
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
....
CheckBox1.Checked:=false;
CheckBox3.Checked:=false;
CheckBox5.Checked:=false;
....
Cheers
0
 

Author Comment

by:delphimate
ID: 10772946
Hi,

Thanks calinutz,that was an easy solution


Regards
DelphiMate.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
A short article about a problem I had getting the GPS LocationListener working.
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 …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

813 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

9 Experts available now in Live!

Get 1:1 Help Now