Page 1 of 1
exit from a dcbrowse window by pushing a dcpushbutton
Posted: Wed Dec 25, 2013 1:38 pm
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 ...
Re: exit from a dcbrowse window by pushing a dcpushbutton
Posted: Thu Dec 26, 2013 1:30 am
by skiman
Hi,
Use the following in the action of your button
ACTION {|| DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList), .... }
Re: exit from a dcbrowse window by pushing a dcpushbutton
Posted: Thu Dec 26, 2013 1:33 am
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
Re: exit from a dcbrowse window by pushing a dcpushbutton
Posted: Thu Dec 26, 2013 3:54 am
by obelix
thank you Chris and Wolfgang for your help
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