Click here to Skip to main content
15,892,697 members
Home / Discussions / C#
   

C#

 
GeneralRe: dll security Pin
Arun Jacob3-Sep-09 22:56
Arun Jacob3-Sep-09 22:56 
GeneralRe: dll security Pin
mustang863-Sep-09 6:21
mustang863-Sep-09 6:21 
GeneralRe: dll security Pin
amit_upadhyay3-Sep-09 6:30
amit_upadhyay3-Sep-09 6:30 
GeneralRe: dll security Pin
mustang863-Sep-09 10:22
mustang863-Sep-09 10:22 
QuestionProblem with sorting string using radix sort [modified] Pin
gamer11272-Sep-09 20:16
gamer11272-Sep-09 20:16 
AnswerRe: Problem with sorting string using radix sort [modified] Pin
Calla3-Sep-09 4:53
Calla3-Sep-09 4:53 
GeneralRe: Problem with sorting string using radix sort Pin
gamer11273-Sep-09 5:15
gamer11273-Sep-09 5:15 
GeneralRe: Problem with sorting string using radix sort Pin
Calla3-Sep-09 20:45
Calla3-Sep-09 20:45 
QuestionSkinning a WinForm Pin
Azghar Hussain2-Sep-09 19:49
professionalAzghar Hussain2-Sep-09 19:49 
QuestionHow to geta an Event? Pin
Jacobb Michael2-Sep-09 19:13
Jacobb Michael2-Sep-09 19:13 
AnswerRe: How to geta an Event? Pin
Calla2-Sep-09 20:25
Calla2-Sep-09 20:25 
GeneralRe: How to geta an Event? Pin
Jacobb Michael2-Sep-09 23:24
Jacobb Michael2-Sep-09 23:24 
QuestionHow to refresh an updated MenuStrip at runtime? Pin
dean93592-Sep-09 19:00
dean93592-Sep-09 19:00 
AnswerRe: How to refresh an updated MenuStrip at runtime? Pin
Muhammad Mazhar2-Sep-09 19:08
Muhammad Mazhar2-Sep-09 19:08 
GeneralRe: How to refresh an updated MenuStrip at runtime? Pin
dean93592-Sep-09 19:55
dean93592-Sep-09 19:55 
AnswerRe: How to refresh an updated MenuStrip at runtime? Pin
Orzer2-Sep-09 21:34
Orzer2-Sep-09 21:34 
GeneralRe: How to refresh an updated MenuStrip at runtime? Pin
dean93593-Sep-09 8:20
dean93593-Sep-09 8:20 
QuestionChanging value of several comboboxes Pin
Denis J. González2-Sep-09 16:42
Denis J. González2-Sep-09 16:42 
Hi,
My situation is this, I have 3 comboboxes (drop down list only, not editable), and If the user changes the value of one of the, the other two should change too.

I have used the SelectedIndexChanged Event successfully to update the other two comboboxes. But I have 2 issues with it, first: The code is not pretty, I have to repeat the same 3 times and secondly everytime a call is made to one combobox's SelectedIndexChanged event the other are called too because I update the indexes of those too in the first call. I know it's kind of hard to understand like this, so here's what I'm doing:

private void  SubNetCountCombo_SelectedIndexChanged(System.Object sender, System.EventArgs e)
{
    HostCountCombo.SelectedIndex = SubNetCountCombo.SelectedIndex;
    newsubnetmaskcombo.SelectedIndex = SubNetCountCombo.SelectedIndex; 
}

private void  HostCountCombo_SelectedIndexChanged(object sender, System.EventArgs e)
{
    SubNetCountCombo.SelectedIndex = HostCountCombo.SelectedIndex;
    newsubnetmaskcombo.SelectedIndex = HostCountCombo.SelectedIndex; 
}
private void  newsubnetmaskcombo_SelectedIndexChanged(System.Object sender, System.EventArgs e)
{
    SubNetCountCombo.SelectedIndex = newsubnetmaskcombo.SelectedIndex;
    HostCountCombo.SelectedIndex = newsubnetmaskcombo.SelectedIndex; 
}


I thought of using a bool variable as a switch, so that everytime I enter each of those events it turns true and when it goes to the other methods I use an if to check for that variable, if it's true I just get out. But it's still not pretty... So.. I'm not sure if there's a better way of accomplishing this..

Thanks!
AnswerRe: Changing value of several comboboxes Pin
Christian Graus2-Sep-09 17:01
protectorChristian Graus2-Sep-09 17:01 
GeneralRe: Changing value of several comboboxes Pin
Denis J. González2-Sep-09 17:06
Denis J. González2-Sep-09 17:06 
GeneralRe: Changing value of several comboboxes Pin
Christian Graus2-Sep-09 17:13
protectorChristian Graus2-Sep-09 17:13 
GeneralRe: Changing value of several comboboxes Pin
Denis J. González2-Sep-09 17:24
Denis J. González2-Sep-09 17:24 
Questionhelp file Pin
AAKAra2-Sep-09 10:54
AAKAra2-Sep-09 10:54 
AnswerRe: help file Pin
Christian Graus2-Sep-09 11:22
protectorChristian Graus2-Sep-09 11:22 
AnswerRe: help file Pin
Abhishek Sur2-Sep-09 11:54
professionalAbhishek Sur2-Sep-09 11:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.