Solved

How to get the value of "Open as read only" Checkbox in Open dialog box?

Posted on 2008-06-11
2
458 Views
Last Modified: 2013-11-23
Hi,
I am using Open Dialog control of Delphi 6. I have to Processed the files selected from the dialogbox. But have to check the Checkbox is checked or not. Acording to the state of the checkbox("Open as Read only") I have to further process the files.
I have attached the image for your reference.
I have tried
IsDlgButtonChecked(odialog.Handle,chx1);
CheckDlgButton functions but not able to do it.
I am getting Handle always 0.
Please I need help.
ReadOnly.JPG
0
Comment
Question by:mananhshah
2 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 125 total points
ID: 21760583
The option flags get updated when the TOpenDialog execute is finished, so just check for ofReadOnly.

Eg:

  if OpenDialog.Execute then
  begin
     if (ofReadOnly in OpenDialog.Options) then
     begin
        ShowMessage('Open as read-only is checked');
     end;
  end;

---

Regards,
Russell

0
 

Author Closing Comment

by:mananhshah
ID: 31466070
Thanks for your answer
0

Featured Post

Industry Leaders: 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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

685 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