when It comes to checkboxes there is a third state called "Indeterminate", what does it mean?
what other controls have this "Indeterminate" state?
thanks
From CheckBox.CheckState property
Indeterminate
The CheckBox displays a check mark and is shaded.
The control appears flat.
Here a nice virtualization of what is exactly mean..
Here a demonstration with Javascript.
Shameless copy and paste from Wikipedia:
Some applications use checkboxes that allow an indeterminate state in
addition to the two provided by a normal checkbox. This third state is
shown as a square or dash in the checkbox, and indicates that its
state is neither checked nor unchecked. This is most often used when
the checkbox is tied to a collection of items in mixed states. The
indeterminate state cannot usually be selected by the user, and
switches to a checked state when activated.
For example, a checkbox presented to select files to send via FTP
might use a tree view so that files can be selected one at a time, or
by folder. If only some of the files in a folder are selected, then
the checkbox for that folder would be indeterminate. Clicking on this
indeterminate checkbox would select all or, less commonly, none of the
contained files. Continuing to click on the checkbox would alternate
between checked (all sub-directories and files selected) and unchecked
(no sub-directories or files selected).
Some tri-state checkbox implementations allow the user to toggle among
all states, including the indeterminate state, by remembering the
mixed state of the items in the collection. This serves as an undo
feature.
In the case of a CheckBox, indeterminate could be used to indicate a "we don't know yet" kind of answer when a true/false situation is present.
Indeterminate can also be used in cases where multiple selection is involved and some items in the list are true, but others false.
Cheers
On binding checkbox if property value is null than checkbox show indetermine state.
Related
I want to raise warning dialog when user manually changes value from a couple of drop-down list. In case of negative answer previous value must be restored, so i decided to use *EditValueChanging event. But there is also one main drop-down list that also changes the value of all desired controls (some sort of default values setup) which causes multiple dialog messages to appear for each control which is not desirable. How can i verify that valuee were changed by user, not by code, to raise dialog window?
Set a boolean value when you update the values from your "default values" setup and unset it when that routine completes, then predicate the EditValueChanging based on whether the boolean is set.
I have a groupbox of checkboxes, I want to link the groupbox with Themes checkboxThemes image is an example.
How to link Theme1 and Theme2 with Themes?
You gave no indication what 'linking Themes to the groupbox' means nor what the indeterminate state means. However, since checking/selecting Theme1 probably excludes the use of Theme2, it seems like you are not using the right UI presentation (since the user can select both).
Consider a ComboBox with the Entries {"No Theme", "Theme 1", "Theme 2"}. That way no one is confused and less form space is consumed.
Edit
If your edit really reflects what you want, set the "outside" check state whenever one of the inside checkbox's checkstate changes. It still makes no sense - what do you do when the user checks/unchecks the outside box?
I am working on window application. I have a form where I will be displaying terms and conditions against shopping done. Below Terms and Conditions, I want to show Checkbox which user have to check as an acceptance before proceeding.
This Checkbox should come below the terms and conditions. If terms and conditions are long enough then user have to scroll down to make sure he has gone through all the agreement. Only after which he can check.
I was thinking to do it with rich textbox. Is it possible to do with any way.
Use scrollbar events to determine when user scrolled whole text and then set checkbox visible. In that case checkbox can be initialy posiotioned outside rich text box ( ex. below).
Don't.
Concerning new users, the checkbox will stay unnoticed by most users, and things will be really confusing when the user will, on submit, see the message saying she didn't check the checkbox, but there will be no visible checkbox in the form. Since there are no existing forms which use such thing, few people will be able to guess it, so some users will just abandon the process, and other will go submit a bug, telling you that the checkbox is missing.
Concerning old users, they don't and won't need to read Terms and Conditions every time, so putting the checkbox at the end creates excise, but brings nothing at all to compensate it.
But you can. Now, technically, you can use a scrollbar, then put in the scrollable area a richedit (with no inner scroll) and a checkbox below. I don't think there is a way to put the checkbox inside the richedit.
use a panel to hold the richTextbox and the checkbox.
set
Panel.AutoSize=false;
Panel.AutoScroll=true;
richTextbox.Dock=DockStyle.Top;
richTextbox.ScrollBars=RichTextBoxScrollBars.None;
richTextbox.Height=richTextbox.lines.length*20;
checkBox.Dock=DockStyle.Bottom;
EDIT
To make checkBox always follows the richTextbox, add following code after:
checkBox.Dock=DockStyle.None;
checkBox.Location=new Point(checkBox.Location.X, richTextbox.Height+richText.box.Location.Y);
I have to set dropdownlost to read only. I can set enabled =false. But I cannot set font color to regular dropdown text. It will show like blur. The samething I did textbox.readonly=false. There we can see font same as regular text, no change.
The same way I want read only for dropdownlist. Is there any way we can do with CSS or javascript or jQuery ?.
Thanks in advance
There is varying browser support for this. Typically, Internet Explorer provides fewer opportunities to override the default greyed out look for disabled controls, than the other main browsers. I have struggled to do this in the past across all browsers. I would be interested to see some answers here that do this rather than my advice not to do it...
I would question why you are doing this. Your users will be used to the default look of disabled controls. It is a visual cue to them that the control is disabled. I would urge you not to disrupt this subtle visual que that people are very very used to.
Unless you can give a compelling reason to do this of course.
One way to hack this would be to not disable the dropdown list at all (taking care of the styling). Then, add an event handler to the change event that sets the dropdown back to the original value. You would have to store the original value, probably in an input of type hidden, and when you handle the change event, first check whether the value is the same as the stored value. If not, set it back. If you don't make this check you will get an infinite loop, because setting it back to the original value will call the change event again.
I have a asp.net treeview control that I need to be able to set a parent node to partially checked to show that child nodes are checked. Basically I need a 3 state or multi-state checkbox. All I can see from looking through the code is ways to set checked true or false.
Thanks.
There is no 3-state or multi-state checkbox in the .Net framework, mostly because this functionality isn't supported in HTML for a checkbox. There are a number of third party components which do this (such as "FolderView" controls). Or you could pretty easily roll your own server control for this. Sorry for the bad news.
I've done this before. What you essentially do is keep track of the state of the underlying checkbox. Utilizing a custom javascript class and CSS sprites for your images, you overlay the checkbox with the appropriate image.
Here is a quick example I found
http://www.codeproject.com/KB/aspnet/TriStateCheckBox.aspx
Here is the concept of CSS Sprites and the tri-state checkbox. I've done something along these lines.
http://shamsmi.blogspot.com/2008/12/tri-state-checkbox-using-javascript.html