In VB6, you could set a check box to checked, unchecked, or greyed. The
latter would be used to show a setting but disable the control.
In .Net, the third choice is not greyed, but indeterminate. And the doc
says it shows it as greyed, but checked. So how do you show greyed and
unchecked?
Disabling the control in total greys out the control's text which is less
than desirable. 8 4663
Ed,
To grey it out, mark Enabled as False.
To check/uncheck, change Checked as needed. Unchecked is False.
Good luck,
Matt
"EdB" <Ed*@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com... In VB6, you could set a check box to checked, unchecked, or greyed. The latter would be used to show a setting but disable the control.
In .Net, the third choice is not greyed, but indeterminate. And the doc says it shows it as greyed, but checked. So how do you show greyed and unchecked?
Disabling the control in total greys out the control's text which is less than desirable.
"EdB" <Ed*@discussions.microsoft.com> schrieb: In VB6, you could set a check box to checked, unchecked, or greyed. The latter would be used to show a setting but disable the control.
In .Net, the third choice is not greyed, but indeterminate. And the doc says it shows it as greyed, but checked. So how do you show greyed and unchecked?
Set the control's 'TreeState' property to 'True'.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
As I stated below......if I follow this approach, the text next to the check
box will be "disabled" as well. That is not the answer I am looking for.
"Matt" wrote: Ed,
To grey it out, mark Enabled as False. To check/uncheck, change Checked as needed. Unchecked is False.
Good luck, Matt
"EdB" <Ed*@discussions.microsoft.com> wrote in message news:06**********************************@microsof t.com... In VB6, you could set a check box to checked, unchecked, or greyed. The latter would be used to show a setting but disable the control.
In .Net, the third choice is not greyed, but indeterminate. And the doc says it shows it as greyed, but checked. So how do you show greyed and unchecked?
Disabling the control in total greys out the control's text which is less than desirable.
"Matt" <mr****@camicro.com> schrieb: To grey it out, mark Enabled as False. To check/uncheck, change Checked as needed. Unchecked is False.
The OP wrote that disabling is not an option:
| Disabling the control in total greys out the control's text which is less
| than desirable
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
OK, I gathered that that had something to do with it, but I am still not clear.
Can you give me a quick code example that shows the checkbox as checked,
then unchecked with the user locked out from manipulating it?
"Herfried K. Wagner [MVP]" wrote: "EdB" <Ed*@discussions.microsoft.com> schrieb: In VB6, you could set a check box to checked, unchecked, or greyed. The latter would be used to show a setting but disable the control.
In .Net, the third choice is not greyed, but indeterminate. And the doc says it shows it as greyed, but checked. So how do you show greyed and unchecked?
Set the control's 'TreeState' property to 'True'.
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
"EdB" <Ed*@discussions.microsoft.com> schrieb: Can you give me a quick code example that shows the checkbox as checked, then unchecked with the user locked out from manipulating it?
It seems that I misunderstood your post too. You can archieve the desired
behavior by setting the checkbox' 'AutoCheck' property to 'False'.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
"Herfried K. Wagner [MVP]" wrote:
setting the checkbox' 'AutoCheck' property to 'False'.
We're getting closer I think, but this is still not the behavior I am truly
after.
I have a business object. The user pulls the record up for editing. A
particular bit field may be viewed but not edited.
Auto check will prevent them from changing the state of the control, but the
fact that box itself is not greyed is not intuitive to the user......they
will wonder why they are clicking in the box and nothing is happening.
As I said, in VB6 you could grey the checkbox and have the text associated
with the checkbox displayed normally. That's what I'm after.
I would use two controls, a checkbox with no text and a label beside it with
the text. You can then enable/disable the checkbox to grey it out and the
label won't be greyed!
"EdB" wrote: "Herfried K. Wagner [MVP]" wrote: setting the checkbox' 'AutoCheck' property to 'False'.
We're getting closer I think, but this is still not the behavior I am truly after.
I have a business object. The user pulls the record up for editing. A particular bit field may be viewed but not edited.
Auto check will prevent them from changing the state of the control, but the fact that box itself is not greyed is not intuitive to the user......they will wonder why they are clicking in the box and nothing is happening.
As I said, in VB6 you could grey the checkbox and have the text associated with the checkbox displayed normally. That's what I'm after. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Fred B |
last post by:
I used VB about a month ago and I don't recall this being greyed out.
How do I get it back?
Thanks.
|
by: Pavs |
last post by:
I have inherited a ms access database that i am meant to alter and
make some changes to.
The database was original i believe created in Access 2000 while now i
am using Access 2002 and my OS is...
|
by: eddie wang |
last post by:
Hello,
I inherited an Access application from a previous coworker. It seems
the Spell Check is never enabled unless I open the application by
holding down the shift key and double clicking the...
|
by: murdo[nospam] |
last post by:
Hi,
Have created a basic vbs test recorded through the browser which loads a
single page but the following error occurs when it's started: Test 'XXXXX'
could not start. (0x80041013).
ACT...
|
by: Ryan |
last post by:
Is there any way to disable controls without causing them to be greyed out?
Such as text boxes, list boxes, etc.
Thanks.
Ryan
| |
by: jimc52 |
last post by:
Hello Everyone: I am hoping one of the gurus here will give me some help.
I have designed a form with some check boxes. I put the checkboxes there on the form so later I could use them as flags on...
|
by: TonyMacaroni |
last post by:
Hi everyone,
total newbie to all of this so please bear with me and help if you can!
I'm creating a database for a charity using Access 2002 SP3, I have a form called "Member Data". Within the...
|
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= |
last post by:
I have an app that displays about 20 items of data in text boxes. Very
occasionally I need to allow these to be used for data entry, but the bulk of
the time they are solely for information. They...
|
by: barrygoodz |
last post by:
I have set up links on a web page to Word files. When you click the
link a dialog box opens asking whether to open or save the file. The
default program to open the file is MS Word. So far so good....
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |