G
Guest
There seems to be a bug where if you're in a textbox, a button can still have focus and prevent you from using the "enter" key in the multi-line textbox. This happens when you have a button and a textbox in a child form, go to another child and return back to the initial child. Here's how to re-create the problem:
1. Create a child form with a button and a MULTILINE textbox.
2. In the MDI parent form, open two of those child forms (you could do it in the OnLoad event)
3. Run the program. Two child forms should show. Let's call the child that's on top "child 1" and the other "child 2"
4. "child 1" is currently on top. Now, click on "child 2" and click back on "child 1".
5. Click on the textbox on "child 1" and hit return ("ENTER"). You will NOT be able to go down to the next line.
It seems that upon re-activating "child 1", the form gives the button the focus again, but does not "release" the focus even when you put the cursor in the textbox.
So, even though you click on the text box & put the cursor there, hitting ENTER still makes the form fire the Click event on the button.
I have not found anything like this in the KB. If you have any workaround or know the solution please let us know.
Thanks!
jgc
1. Create a child form with a button and a MULTILINE textbox.
2. In the MDI parent form, open two of those child forms (you could do it in the OnLoad event)
3. Run the program. Two child forms should show. Let's call the child that's on top "child 1" and the other "child 2"
4. "child 1" is currently on top. Now, click on "child 2" and click back on "child 1".
5. Click on the textbox on "child 1" and hit return ("ENTER"). You will NOT be able to go down to the next line.
It seems that upon re-activating "child 1", the form gives the button the focus again, but does not "release" the focus even when you put the cursor in the textbox.
So, even though you click on the text box & put the cursor there, hitting ENTER still makes the form fire the Click event on the button.
I have not found anything like this in the KB. If you have any workaround or know the solution please let us know.
Thanks!
jgc