Click here to Skip to main content
15,905,782 members
Home / Discussions / C#
   

C#

 
AnswerRe: Business Object Properties in Random Order Pin
tgrt19-Feb-07 13:12
tgrt19-Feb-07 13:12 
GeneralRe: Business Object Properties in Random Order Pin
Thomas Wells20-Feb-07 8:12
Thomas Wells20-Feb-07 8:12 
GeneralRe: Business Object Properties in Random Order Pin
tgrt20-Feb-07 9:37
tgrt20-Feb-07 9:37 
QuestionInteraction Pin
ugrasamam19-Feb-07 5:24
ugrasamam19-Feb-07 5:24 
AnswerRe: Interaction Pin
sharpiesharpie19-Feb-07 6:08
sharpiesharpie19-Feb-07 6:08 
AnswerRe: Interaction Pin
NanaAM19-Feb-07 19:53
NanaAM19-Feb-07 19:53 
AnswerRe: Interaction Pin
ugrasamam20-Feb-07 20:03
ugrasamam20-Feb-07 20:03 
QuestionNeed Help with Strange TextBox.Leave behavior Pin
Rabbit1719-Feb-07 5:05
Rabbit1719-Feb-07 5:05 
I have a textbox and two radio buttons. If the value in the textbox is negative, radiobtn2 should be selected otherwise if it is positive radiobtn1 should be selected.

First, the code:

this.textbox1.Leave += new System.EventHandler(this.textbox1_Leave);

private void textbox1_Leave(object sender, System.EventArgs e)
{
string firstchar = textbox1.Text.Trim().Substring(0, 1);
//MessageBox.Show("function called");
if(firstchar == "-")
radiobtn2.Select();
else
radiobtn1.Select();
}

The strange behavior is:
1) that his works if I Tab out of the textbox but not if I click out of the textbox.
2) I put a simple messagebox.show in the textbox1_Leave function to see if it was being called, and the messagebox appears when I click out of the textbox and the code then works with a radiobtn being selected! This tells me the function is being called, but when I remove messagebox.show the function again no longer works!
I also tried changing the EventHandler from Leave to LostFocus and the same behavior exists.

Any ideas why this is or what I can do to work around it without having the user's progress be interrupted?

Thanks,

RABB17

"Nothing fancy needed, please just solve all our problems as quickly as possible."

AnswerRe: Need Help with Strange TextBox.Leave behavior Pin
sharpiesharpie19-Feb-07 5:15
sharpiesharpie19-Feb-07 5:15 
GeneralRe: Need Help with Strange TextBox.Leave behavior Pin
Rabbit1719-Feb-07 6:23
Rabbit1719-Feb-07 6:23 
Questioncopy complete dir Pin
topcatalpha19-Feb-07 5:05
topcatalpha19-Feb-07 5:05 
AnswerRe: copy complete dir Pin
Pete O'Hanlon19-Feb-07 5:11
mvePete O'Hanlon19-Feb-07 5:11 
GeneralRe: copy complete dir Pin
topcatalpha19-Feb-07 5:14
topcatalpha19-Feb-07 5:14 
AnswerRe: copy complete dir Pin
NanaAM19-Feb-07 19:58
NanaAM19-Feb-07 19:58 
QuestionIcon for Alt+TAB Pin
wasife19-Feb-07 5:03
wasife19-Feb-07 5:03 
AnswerRe: Icon for Alt+TAB Pin
Thomas Stockwell19-Feb-07 6:28
professionalThomas Stockwell19-Feb-07 6:28 
GeneralRe: Icon for Alt+TAB Pin
wasife19-Feb-07 17:34
wasife19-Feb-07 17:34 
QuestionQuestion about changing compilation folder Pin
sharpiesharpie19-Feb-07 4:30
sharpiesharpie19-Feb-07 4:30 
AnswerRe: Question about changing compilation folder Pin
Colin Angus Mackay19-Feb-07 4:35
Colin Angus Mackay19-Feb-07 4:35 
GeneralRe: Question about changing compilation folder Pin
sharpiesharpie19-Feb-07 4:37
sharpiesharpie19-Feb-07 4:37 
GeneralRe: Question about changing compilation folder Pin
Colin Angus Mackay19-Feb-07 4:53
Colin Angus Mackay19-Feb-07 4:53 
GeneralRe: Question about changing compilation folder Pin
sharpiesharpie19-Feb-07 4:55
sharpiesharpie19-Feb-07 4:55 
GeneralRe: Question about changing compilation folder Pin
Colin Angus Mackay19-Feb-07 5:02
Colin Angus Mackay19-Feb-07 5:02 
GeneralRe: Question about changing compilation folder Pin
sharpiesharpie19-Feb-07 5:06
sharpiesharpie19-Feb-07 5:06 
QuestionClient Certificates and Web Services Pin
tcpdave19-Feb-07 4:26
tcpdave19-Feb-07 4:26 

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.