exit from a dcbrowse window by pushing a dcpushbutton

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
obelix
Posts: 48
Joined: Tue Dec 03, 2013 7:44 am
Location: Villingen-Schwenningen, Black Forest, Germany

exit from a dcbrowse window by pushing a dcpushbutton

#1 Post by obelix »

I want to terminate a dcbrowse window when I execute a function in the ACTION parameter of a
DCPUSHBUTTON. Before executing the function anmenu2() the actual window should be closed.
Generally: how can I close a window without using the ADDBUTTONS. i.e. by using the ENTER-key


DCBROWSE ...
...
@ 10,6 DCPUSHBUTTON CAPTION "Angebot" SIZE 12,1 ACTION {||anmenu2()}
...
DCREAD GUI ...
quiet old but still young and unskilled in express++

skiman
Posts: 1189
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: exit from a dcbrowse window by pushing a dcpushbutton

#2 Post by skiman »

Hi,

Use the following in the action of your button
ACTION {|| DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList), .... }
Best regards,

Chris.
www.aboservice.be

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: exit from a dcbrowse window by pushing a dcpushbutton

#3 Post by Wolfgang Ciriack »

Hello,
i don't know, if i understand your question right, but you can do:

Code: Select all

DCBROWSE ...
...
@ 10,6 DCPUSHBUTTON CAPTION "Angebot" SIZE 12,1 ACTION {|| DC_ReadGuiEvent(DCGUI_EXIT_OK}
@ 10,6 DCPUSHBUTTON CAPTION "Abbruch" SIZE 12,1 ACTION {|| DC_ReadGuiEvent(DCGUI_EXIT_ABORT}
...
DCREAD GUI  TO lExit

if lExit
   anmenu2()
endif
Here you find a german XBase-Forum, were you can post questions in german, too:
http://www.xbaseforum.de/index.php
_______________________
Best Regards
Wolfgang

User avatar
obelix
Posts: 48
Joined: Tue Dec 03, 2013 7:44 am
Location: Villingen-Schwenningen, Black Forest, Germany

Re: exit from a dcbrowse window by pushing a dcpushbutton

#4 Post by obelix »

thank you Chris and Wolfgang for your help :D
As the Pushbutton I described is only one of several statements, i had to put the function call anmenu2() into the HANDLER statement myhandler of the DC READ GUI.
So it really works perfectly
quiet old but still young and unskilled in express++

Post Reply