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
Solved

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

Posted on 2008-06-11
2
457 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

792 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