Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
QuestionMultiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 4:44
Mustafa Ismail Mustafa11-Jun-09 4:44 
AnswerRe: Multiple Default buttons on a form dependant on the situation Pin
0x3c011-Jun-09 4:55
0x3c011-Jun-09 4:55 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 6:13
Mustafa Ismail Mustafa11-Jun-09 6:13 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Henry Minute11-Jun-09 6:18
Henry Minute11-Jun-09 6:18 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 6:24
Mustafa Ismail Mustafa11-Jun-09 6:24 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Henry Minute11-Jun-09 6:30
Henry Minute11-Jun-09 6:30 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 6:36
Mustafa Ismail Mustafa11-Jun-09 6:36 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
0x3c011-Jun-09 6:25
0x3c011-Jun-09 6:25 
By exposing the Button, TextBox and Label, you could make changes to them - with a bit of designer hodge-podge, and a few PropertyGrid attributes you might be able to get that code into the Designer.cs files, where it would normally be. If the controls are exposed, you can hook the events as usual. It would probably be immensely boring to add the controls manually, but IMO it'd look better than one humongous switch statement. You could also try putting the name of the Button which should be clicked in the Tag property of the TextBox and having a common KeyPress handler for every TextBox which reads the Tag, searches for a Button with that name in the Parent's Controls collection, and clicks it

Between the idea
And the reality
Between the motion
And the act
Falls the Shadow

GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 6:30
Mustafa Ismail Mustafa11-Jun-09 6:30 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
0x3c011-Jun-09 6:35
0x3c011-Jun-09 6:35 
AnswerRe: Multiple Default buttons on a form dependant on the situation Pin
S. Senthil Kumar11-Jun-09 7:38
S. Senthil Kumar11-Jun-09 7:38 
Questionxp sidebar in .net2005 Pin
gadeypavan11-Jun-09 4:32
gadeypavan11-Jun-09 4:32 
AnswerRe: xp sidebar in .net2005 Pin
soloforce11-Jun-09 4:34
soloforce11-Jun-09 4:34 
GeneralRe: xp sidebar in .net2005 Pin
gadeypavan11-Jun-09 4:42
gadeypavan11-Jun-09 4:42 
GeneralRe: xp sidebar in .net2005 Pin
Manas Bhardwaj11-Jun-09 5:11
professionalManas Bhardwaj11-Jun-09 5:11 
GeneralRe: xp sidebar in .net2005 Pin
Dave Kreskowiak11-Jun-09 5:25
mveDave Kreskowiak11-Jun-09 5:25 
GeneralRe: xp sidebar in .net2005 Pin
EliottA11-Jun-09 5:46
EliottA11-Jun-09 5:46 
GeneralRe: xp sidebar in .net2005 Pin
saurabh sahay11-Jun-09 6:10
saurabh sahay11-Jun-09 6:10 
QuestionCMD.exe help Pin
soloforce11-Jun-09 4:30
soloforce11-Jun-09 4:30 
AnswerRe: CMD.exe help Pin
saurabh sahay11-Jun-09 5:01
saurabh sahay11-Jun-09 5:01 
GeneralRe: CMD.exe help Pin
soloforce11-Jun-09 5:51
soloforce11-Jun-09 5:51 
GeneralRe: CMD.exe help Pin
saurabh sahay11-Jun-09 5:58
saurabh sahay11-Jun-09 5:58 
GeneralRe: CMD.exe help Pin
saurabh sahay11-Jun-09 5:59
saurabh sahay11-Jun-09 5:59 
GeneralRe: CMD.exe help Pin
soloforce11-Jun-09 6:55
soloforce11-Jun-09 6:55 
GeneralRe: CMD.exe help Pin
EliottA11-Jun-09 7:51
EliottA11-Jun-09 7:51 

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.