Win32lib focus problem
- Posted by Alexander Toresson <toressonodakra at swipnet.se> Dec 05, 2004
- 473 views
Try this piece of code:
without warning include win32lib.ew integer main, mle, msgedit main = create(Window, "Click in the one-line text-edit and press enter", 0, 200, 200, 500, 300, 0) mle = create(MleText, "", main, 0, 0, 450, 100, 0) msgedit = create(EditText, "", main, 0, 150, 450, 23, 0) WinMain(main, Normal)
Pressing enter in the EditText will automatically give focus to the MleText! Why? I tried to do a work-around by setting the focus to the EditText when receiving a VK_ENTER keypress. Didn't work. The focus was still set to the MleText. Then I tried setting focus to the MleText. And that gave focus to the EditText! Win32lib seems to mix them up. And this work-around will stop working when this bug is fixed :( Regards, Alexander Toresson Shhh! Be vewy quiet! I'm hunting wuntime ewwows!