Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-06-11
2
Medium Priority
?
465 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
[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
2 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

604 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