Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Strange editbox focus behaviour

Author
Message
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 18th Aug 2017 15:50
Hi all,

In an effort to make my program's ui as user-friendly as possible (!) I am trying to control the focus of edit boxes to prevent the user having to click/tap around too much.

Would you mind having a quick look at this code? In it, tab moves the focus between the boxes - this works. Enter focuses a box if it is empty or just contains spaces - this doesn't work.



I think AppGameKit is trying to do something clever with the Enter key which is getting in my way

Thanks for any suggestions/advice.

Jambo
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 21st Aug 2017 13:26
When you press the Enter key any edit box that has focus, loses focus. Your code works as you expect if you change the key to anything other than Enter.
However, to do what I think you are trying to do and use the Enter key, try this:
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 21st Aug 2017 17:14 Edited at: 21st Aug 2017 17:15
how about this
AGK (Steam) V2017.08.16 : Windows 10 Pro 64 Bit : AMD (17.7.2) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 21st Aug 2017 17:40
I see where you're coming from - thanks Scraggle and Markus

James

Login to post a reply

Server time is: 2024-11-24 09:58:39
Your offset time is: 2024-11-24 09:58:39