|
hi guys,
i use in my form a checkedlistbox ...my problem is that when i write this code this.checkedListBox1.SelectionMode = SelectionMode.One; i would expect only one checkbox to be checked every time.But in my case i can select all the checkboxes so something is wrong..
thanks in advance..
|
|
|
|
|
I guess that the CheckedListBox can only have one selected item (meaning that only one row has highlighted atta time)
That doesn't limit the number of check's that the user can set. Checkboxes aren't mutually exclusive, they "hint" that the user can check multiple items. If you want a mutual exclusive selection, try changing to a RadioButton[^].
The radiobutton allows the user to select 1 item from the list of options.
I are Troll
|
|
|
|
|
I haven't checked this out, since I don't have VS on this machine, but SelectionMode usually refers to the Items in the ListBox not the CheckBoxes .
I do not know of any simple way to restrict how many items are checked. You can periodically check on the CheckedItems collection and uncheck any except for the one you want, but what event you would use to trigger this checking, I do not know.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
Confusingly the SelectionMode does not refer the number of items that may be checked but the desired effect is possible through the ItemChecked event.
The new item is checked only after the handler returns and so single selection can be achieved by simply removing all existing checks.
private void CheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
if (e.NewValue == CheckState.Checked) {
CheckedListBox clb = sender as CheckedListBox;
if (clb != null) {
foreach (Int32 index in clb.CheckedIndices) {
clb.SetItemCheckState(index, CheckState.Unchecked);
}
}
}
}
Alan.
|
|
|
|
|
Hi,
checkedlistbox.selectionMode can not limit the count of selected items
you can use JS code to control
or you can try: GroupBoxCheckBox or GroupBoxCheckBox
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 22:02pm.
|
|
|
|
|
hi
i developed a project and a setup is made using dotnet.
my requirement is it should run only in one system.
suppose if a client has 10 systems
if i install it in system1, then it should run in system1 only
if the same setup is installed in system2 then it should not run
is it possible
|
|
|
|
|
vijaylumar wrote: is it possible
Yes. Find something to identify the computer that the application is installed on (harddisk serial, computer name), and check whether this has changed during your last run.
I are Troll
|
|
|
|
|
Hi.
Whenever I change the text of a label with long text the direction of the increasing is to the right.
like these images :
01[^] >> 02[^]
I want to change it, I mean I want to change the direction to the left !
Could you please guide me ?
Thanks.
|
|
|
|
|
Just a guess, but if in your case you have a langauge which is read from right to left than you can use the RightToLeft property of the label and set it to true.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I've tested it, but it doesn't change the direction of increasing.
|
|
|
|
|
Because the label always assumes it's position from the top left corner (like all controls) it will not automatically grow to the left. The only way you can do what you want is to set the TextAlign to MiddleRight, TopRight or BottomRight, and set AutoSize to false. Manually set a good size for the label, and the text will grow to the left.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi all
I want to make application that take name,password ,Email as input and create me Email in hotmail.....so can anyone give me idea to develop this application.....
Dre@m is not th@t wh@t u see in sleep.Dre@m is the thing which does not allow u to sleep
|
|
|
|
|
|
Hi all
I want samples of mapInfo files....can anyone provide me or give me URL from where I can download it .........I want to make software
that read mapInfo files and create map from these files
Dre@m is not th@t wh@t u see in sleep.Dre@m is the thing which does not allow u to sleep
|
|
|
|
|
Google for 'mapinfo net c#'
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Hello,
I have a class called Host which contains a thread waiting for "x" players to get Accept()(array of sockets)
(I am using the EaterGame classes)
I want to allow the user to choose dynacimlly how much ppl he wants to Accept() and not just as the server created.
I have a button called "connect" which hold an event to send EndAccept() to the last Accept() which was created in the array of sockets.
I was reading some books and understood that EndAccept() can be used only if I use BeginAccept and still EndAccept wont be called outsite the function.
How can I cancel an Accept() request ? I just want the thread which create the array to contiune...
Thanks!
|
|
|
|
|
When i send mail to my own domain it works fine but when i send mail to another domain like gmail,yahoo it gives above exception.
would u tell me why?
Thanks in advance
Md Shafikul Islam
|
|
|
|
|
Well, if this was a programming question, I'd expect it to come with some code. I would guess that you're using your own mail server, and it's refusing to send the mail on, or you work for a notorious generater of spam, and therefore your server has been blocked by both gmail and yahoo.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Is it possible to highlight a defined area of a rendered PDF file, using the adobe Reader activeX control ver 7.0 ?
I cannot seem to be able to this, i can display fine but cannot draw on or highlight an area ?
Help from someone experienced here would be appreciated, the methods seem to be there, but i cant get a result.
|
|
|
|
|
1) 'setview' function may can help you, but i think it's impossible.
2) try to use win32 API to find the control you want to highlight, but i think it's impossible.
adobe Reader activeX control ver 7.0 never support that Interface functions.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 22:03pm.
|
|
|
|
|
If I use the publish feature and ClickOnceDeloyment, can I schedule that application as scheduled task?
I didn't get any requirements for the signature
|
|
|
|
|
Good afternoon.
The following code creates a text file at any location except to the Desktop or MyDocuments. It is desgined to save to a flash drive primarily, but it tests for the absence of the FD and will save to another location.
DialogResult dr = fbd.ShowDialog();
if (dr == DialogResult.OK)
{
strFolderName = fbd.SelectedPath;
SW = File.CreateText(strFolderName + strFileName);
foreach (XElement xe in Results.Descendants())
{
if (xe.HasElements)
{
foreach (XElement xeDesc in xe.Descendants())
{
if (xeDesc.Value != null)
{
SW.WriteLine(xeDesc.Value);
}
}
}
}
SW.Close();
Can't seem to figure out why it won't save to those locations. I did a little test text file (using TextWriter) and it worked.
Any suggestions? WHEELS
|
|
|
|
|
Hi,
Wheels012 wrote: Any suggestions?
three for starters:
1. implement a decent try-catch,
2. look at Exception.ToString(),
3. and give us the details if still puzzled.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
|
What's the actual path you're trying to save to?
|
|
|
|