Solved

Uncheck a CheckBox in Delphi

Posted on 2004-04-05
3
2,779 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 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

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