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

x
?
Solved

Invert a boolean value

Posted on 2006-11-12
1
Medium Priority
?
209 Views
Last Modified: 2010-04-01
I have a Tcheckbox.
If the Tcheckbox is checked, I'd like an Tedit to be disabled.

In VB I would have written it like this
Tedit.Enabled = Not Tcheckbox.value

How would I write this in C++

Arild
0
Comment
Question by:arildj78
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 17926630
In C++, you can do that in a similar way using the '!' (logical not) operator, e.g.

Tedit.Enabled = !Tcheckbox.value;

0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

972 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