Yes, I tried that alreday. It's not working properly because I also have
code for when that radio button status changed. It's interferring with the
listbox selectedindeschange. It took care of de-selecting the 'Include all'
radio button and select the Include all button. But the new problem with
this code is now when I select the 'Select All' radio button it will flash
the radio button was check in the blink of an eye and then uncheck it and
check the 'Incldue' radio button even when the entire list is selected. Is
there anyway around this?
Thanks,
Alpha
if (radioAllItems.Checked == true)
{
// for (int x = 0; x < this.lstSelections.Items.Count; x++)
// {
// this.lstSelections.SetSelected(x, true);
// }
this.Show();
// Do focused work here.
if (this.listBox1.Items.Count > 0)
{
this.listBox1.Focus();
this.listBox1.SetSelected(0, true);
SendKeys.Send("+{END}");
}
}
else
lstSelections.ClearSelected();
}
private void lstSelections_SelectedIndexChanged(object sender,
System.EventArgs e)
{
if (radioAllItems.Checked == true)
if (this.lstSelections.SelectedItems.Count < lstSelections.Items.Count)
{
radioAllItems.Checked = false;
radioInclude.Checked = true;
}
}
"Alex Passos" wrote:
Take a look at implementing the OnSelectedIndexChanged event and that will
reveal in your code which items are selected and from there you can
programmatically change the radio buttons. Here is the article:
http://msdn.microsoft.com/library/de...angedtopic.asp
"Alpha" <Al***@discussions.microsoft.com> wrote in message
news:DA**********************************@microsof t.com...I have 3 radio buttons for include, exclued or 'select all' from the
listbox
items. If a user selects the 'Select All' button' then all items in
listbox
is hi-lited as selected. Now, when user selects one item out of the 'all
selected' listing then there is now only one item selected. How and where
can I put in some code to change the selected radio button to the
'include'
since it is no longer in select all mode.
Thanks,
Alpha