dcsay get dcread gui without buttons

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
alepap
Posts: 94
Joined: Tue Jul 28, 2015 5:15 am

dcsay get dcread gui without buttons

#1 Post by alepap »

I need to get 2 gets without having to press a ok button.

this is my code

******************************************************************************
FUNCTION sGETLOGIN()
LOCAL GetList[0], GetOptions, cID := SPACE(30), cPASSWORD := SPACE(30), lStatus

@ 3,2 DCSAY 'Identification' GET cID GETSIZE 30

@ 4,2 DCSAY 'Password' GET cPASSWORD GETSIZE 30 ;
PASSWORD

DCGETOPTIONS ;
NOMINBUTTON ;
NOMAXBUTTON ;
ENTERTAB ;
SAYRIGHTBOTTOM ;
SAYWIDTH 120 ;
TABSTOP

DCREAD GUI ;
FIT ;
OPTIONS GetOptions ;
ADDBUTTONS ;
ENTEREXIT ; // is this the problem?
TITLE 'Login' ;
MODAL ;
TO lStatus

IF lStatus
// do stuff here
ELSE
// do stuff here
ENDIF

RETURN .T.
******************************************************************************


I need to get out of the GET loop.
For now, if I use the ADDBUTTONS, I can press OK to terminate the GET loop.

If I remove the ADDBUTTONS, I tried the ENTEREXIT but does not work.
How do I enter first GET, enter second GET and exit the GET loop without the OK button?

Thank you,

Alexandre Papillon

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: dcsay get dcread gui without buttons

#2 Post by rdonnay »

Your problem is the ENTERTAB clause of DCGETOPTIONS.

This causes the ENTER key event to be processed as a TAB key event and therefore the ENTEREXIT does not work.

Remove ENTERTAB and it will work just fine.
The eXpress train is coming - and it has more cars.

User avatar
alepap
Posts: 94
Joined: Tue Jul 28, 2015 5:15 am

Re: dcsay get dcread gui without buttons

#3 Post by alepap »

Works perfectly. Thank you.

Post Reply