Click here to Skip to main content
15,888,337 members
Home / Discussions / C#
   

C#

 
GeneralRe: Function method Pin
Kasic Slobodan20-Sep-06 6:42
Kasic Slobodan20-Sep-06 6:42 
QuestionExposing C# to COM / Inheritance of objects/interfaces Pin
Adam Clauss20-Sep-06 2:21
Adam Clauss20-Sep-06 2:21 
QuestionTrim textbox Pin
Yustme20-Sep-06 2:14
Yustme20-Sep-06 2:14 
QuestionRe: Trim textbox Pin
Sebastian Schneider20-Sep-06 2:29
Sebastian Schneider20-Sep-06 2:29 
AnswerRe: Trim textbox Pin
Yustme20-Sep-06 2:39
Yustme20-Sep-06 2:39 
GeneralRe: Trim textbox Pin
J4amieC20-Sep-06 2:54
J4amieC20-Sep-06 2:54 
GeneralRe: Trim textbox Pin
Yustme20-Sep-06 3:10
Yustme20-Sep-06 3:10 
GeneralRe: Trim textbox Pin
Sebastian Schneider20-Sep-06 3:21
Sebastian Schneider20-Sep-06 3:21 
My guess: The text-changed event fired again.

Scenario:

User enters a "space" in the first textbox. The text-changed event fires.
The method gets called. The string is trimmed (now empty) and stored in the Text-Property. The new text (empty) is different from the old text (space) so the text-changed event fires AGAIN.
Completion of the first call occurs (MessageBox and all).
The method gets called again for the second text-changed event. This time, trimming yields the same string as before, so no change occurs.
Completion of the second call occurs (MessageBox and all).

You could either remove the handling from the text-changed-event during the trim (not sure if that works) or you could actually compare the new string to the old one and return immediately if they match.

And I am sure there is a better way Wink | ;)

Cheers,
Sebastian

--
Contra vim mortem non est medicamen in hortem.

GeneralRe: Trim textbox Pin
Yustme20-Sep-06 3:52
Yustme20-Sep-06 3:52 
QuestionMicrosecond timers/delays Pin
sjembek20-Sep-06 2:12
sjembek20-Sep-06 2:12 
AnswerRe: Microsecond timers/delays Pin
S. Senthil Kumar20-Sep-06 6:01
S. Senthil Kumar20-Sep-06 6:01 
GeneralRe: Microsecond timers/delays Pin
sjembek27-Sep-06 1:52
sjembek27-Sep-06 1:52 
QuestionHow to put a clickable button on a PropertyGrid ? Pin
sharongav20-Sep-06 1:35
sharongav20-Sep-06 1:35 
QuestionError On Running Project Of SMS Pin
manishgkumar20-Sep-06 1:27
manishgkumar20-Sep-06 1:27 
QuestionProblem in Combobox Itemdata Pin
M Riaz Bashir20-Sep-06 1:24
M Riaz Bashir20-Sep-06 1:24 
QuestionHow to call Page_Load event from other aspx file.? Pin
irkahc20-Sep-06 1:00
irkahc20-Sep-06 1:00 
AnswerRe: How to call Page_Load event from other aspx file.? Pin
Christian Graus20-Sep-06 1:17
protectorChristian Graus20-Sep-06 1:17 
GeneralRe: How to call Page_Load event from other aspx file.? Pin
irkahc20-Sep-06 2:21
irkahc20-Sep-06 2:21 
GeneralRe: How to call Page_Load event from other aspx file.? Pin
J4amieC20-Sep-06 2:52
J4amieC20-Sep-06 2:52 
GeneralRe: How to call Page_Load event from other aspx file.? Pin
Christian Graus20-Sep-06 10:47
protectorChristian Graus20-Sep-06 10:47 
Questionhow to write a number in a cell Pin
faladrim20-Sep-06 0:53
faladrim20-Sep-06 0:53 
AnswerRe: how to write a number in a cell Pin
sikandarhayat20-Sep-06 1:03
sikandarhayat20-Sep-06 1:03 
GeneralRe: how to write a number in a cell Pin
faladrim20-Sep-06 1:21
faladrim20-Sep-06 1:21 
GeneralRe: how to write a number in a cell Pin
albCode20-Sep-06 1:37
albCode20-Sep-06 1:37 
GeneralRe: how to write a number in a cell Pin
faladrim20-Sep-06 1:41
faladrim20-Sep-06 1:41 

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.