Solved

Problem disabling an element of a set

Posted on 2004-08-16
3
198 Views
Last Modified: 2010-04-05
I have a a control that I am working with.  When I look at it in the Object inspector, I see the properties.  One of the properties (SearchProperties) has a '+' sign beside it.  I click on the '+' and the properties expand.  One of the sub-properties is of particular interest.  It is called 'okIncludeSubFolder'.  it can be either True or False.  It is one of a set of sub-properties of SearchProperties.  My issue is that I need to be able to set it to True or False PROGRAMATICALLY.  

I can set it to true without problem....

    If ProcessSubFolders.Checked = True then
        ES1.SearchOptions := [okIncludeSubFolder]

I cannot figure out how to set it to False.

Any help appreciated.

Thanks
George S
0
Comment
Question by:gspears060598
  • 3
3 Comments
 
LVL 2

Accepted Solution

by:
beermequik earned 125 total points
ID: 11813032
This will work

 ES1.SearchOptions := ES1.SearchOptions - [okIncludeSubFolder];
0
 
LVL 2

Expert Comment

by:beermequik
ID: 11813046
you should also set it this way....

If ProcessSubFolders.Checked = True then
        ES1.SearchOptions := WS1.SearchOptions +  [okIncludeSubFolder];

that way the other properties of the TSearchOptions arent affected.
0
 
LVL 2

Expert Comment

by:beermequik
ID: 11813067
one more thing.....

It is a better practice not to use "if a=true.."

just use " if a"

so your code would be...

If ProcessSubFolders.Checked then
        ES1.SearchOptions := WS1.SearchOptions +  [okIncludeSubFolder];

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
loading dll from external path 1 213
searching for DavidI's "Mobile Summer School download" 3 128
how to update exe applicatio from internet ? 6 69
update joined tables 2 32
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now