Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem disabling an element of a set

Posted on 2004-08-16
3
Medium Priority
?
205 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 500 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

Technology Partners: 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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

886 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