forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


React to pressing "ENTER" in an edit dialog elemen

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Estas
Contributor
Contributor


Joined: 31 Jan 2004
Posts: 66
Location: Germany

PostPosted: Mon Apr 24, 2006 3:47 pm    Post subject: React to pressing "ENTER" in an edit dialog elemen Reply with quote

Hi all,
how can I react to and "ENTER" in an edit dialog element?
To be more exact, after a user inputs some text in an edit field and presses "Enter" afterwards, I need to perfom a check.
How do I detect this "Enter" input?
Greetings Mike

_________________
Greetings to all the folks back home in the States. A friendly "hola -como estas" to all my friends from Spain and Greece.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Mon Apr 24, 2006 6:48 pm    Post subject: Reply with quote

The EXIT style will detect a focus change by Tab/Mouse but you probably need a button to for an Enter event. Try:

Code:
  DIALOG CREATE,EnterTest,-1,0,193,65
  DIALOG ADD,EDIT,EDIT1,10,7,180,19
  DIALOG ADD,BUTTON,BUTTON1,36,123,64,24,OK,,DEFAULT
  # or the button could be hidden
  # DIALOG ADD,BUTTON,BUTTON1,0,0,0,0,OK,,DEFAULT
  DIALOG SHOW
:Evloop
  wait event
  goto @event()
:BUTTON1BUTTON
  %T = @dlgtext(edit1)
  if %T
    info %T
  end
  goto evloop
:Close
  exit
Back to top
View user's profile Send private message Send e-mail
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 25, 2006 3:22 am    Post subject: Reply with quote

there is a button you can create on your interface that when the ENTER button is pressed, then it gets to work

i can't remember the syntax for that button, perhaps a search in the vds help file will help ... from memory, there is a reference there of how to do it

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Tue Apr 25, 2006 3:34 am    Post subject: Reply with quote

When you assign a Button the "Default" syle as above it will react to the Enter key.
Back to top
View user's profile Send private message Send e-mail
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Apr 25, 2006 4:11 am    Post subject: Reply with quote

ooppss!!!

didn't look at your code just your comment about EXIT and assumed your code dealt with that

Embarassed Embarassed Embarassed

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Estas
Contributor
Contributor


Joined: 31 Jan 2004
Posts: 66
Location: Germany

PostPosted: Tue Apr 25, 2006 8:41 am    Post subject: Reply with quote

Thanks - perfect,
thats exactly what I wanted - I didn't know about the "Default" Option.
Greeting Mike

_________________
Greetings to all the folks back home in the States. A friendly "hola -como estas" to all my friends from Spain and Greece.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group