How to unfocus/disable editbox?

This forum is currently in read-only mode.
  • In my level editor I have an edit box, after I'm done using the editbox and start placing tiles again, I'll try and scroll the screen using WASD keys. However whenever I use the keyboard, the letters I press will keep being placed into the editbox � even though I've clicked away from it before typing.

    I tried using the "disable" and "focus off" actions for the editbox, but that prevents any keyboard input at all until I give the editbox focus again.

    Editboxes are so annoying! Anyone have any ideas on what I could do?

  • Thanks.

    I tried adding it the script in, but it gives an error. I don't really understand python.

    <img src="http://dl.dropbox.com/u/1024727/errororr.PNG">

  • Ctypes is a python library. Here is all the python files you need:

    http://dl.dropbox.com/u/5426011/examples3/py.zip

    Don't unzip it, just put it in the same directory as your cap.

    Then use this script:

    sys.path.append(System.AppPath + 'py.zip')
    from ctypes import *
    windll.user32.SetFocus(Window.AppWindow)[/code:1k0cvt8s]
  • Even though you did that system.apppath thing, I think its looking for it somewhere else?

    <img src="http://dl.dropbox.com/u/1024727/errodrs.PNG">

  • interesting idea, thanks

  • I'm sorry to wake up an old topic ^^ But I really need (buddy40)'s file.. I have problem with that editbox focux off. :( I handle that problem with minimize application and maximize again. But now I need to work on fullscreen so I can't use that method. Thank you..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Not sure what buddy40's cap did, but destroying the object works.

  • fixed in the next build

  • fixed in the next build

    Tease :)

  • @alastair Spider_hip merry xmas. copy over the plugins/runtime folder, NOT the plugins/ folder

    I'm just as anxious for the next build release as the rest of you. Seeing as the latest C2 just released a day or two ago, we know what ashley was busy with. The good news is, during the wait, there have been a number of additions to the next version. including this editbox thing.

  • Thank you verymuch lucid you're great.. It works great..

    But I relaised a weird bug. If an editbox doesn't focus on than you can't see it's border, and can't select it. Even if you click it's invicible area.

    For example with this plugin, if you try to use scidave's network plugin, you can't see and select ip and name editboxes. If you focus on one of them than other one becomes unfocused ^^.

    Thank you for all your work.

  • ah..ok, I think I fixed it, try this:

    download again

  • Thank you again :) I'm really sorry to disturb you again and again. But now I found weird problem again :)

    If I create a new app, It works. But I tried netshooter's cap(online plugin demo). When I click to host button, It gives error and app ends. If I change edit plugin with old one, then when I click to host, It works.

    Why could it be like that ?

  • hmm..not sure.

    don't have time just now to hunt this down. I reverted it back to the previous version for this release. definitely don't want to delay it anymore than it already has

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)