?
Solved

Uncheck a CheckBox in Delphi

Posted on 2004-04-05
3
Medium Priority
?
3,009 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
[X]
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
3 Comments
 
LVL 4

Assisted Solution

by:PerryDK
PerryDK earned 200 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 800 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Make the most of your online learning experience.
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…
Introduction to Processes

649 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