Solved

Problem disabling an element of a set

Posted on 2004-08-16
3
202 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
[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
  • 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

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

Suggested Solutions

Title # Comments Views Activity
how to send memory stream from ics Client To ics server ? 11 207
DBGrid or StringGrid ? 6 136
enhance the following code 3 53
Automatic field translation delphi 10.2 6 45
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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