Page 1 of 1

exit form dcbrows-object with double click

Posted: Fri May 02, 2014 1:36 am
by obelix
hi everybody

i want to leave a DCBROwSE object. If I use the ENTER-key it works but not with a mouse double click.

@ 3,2 DCBROWSE oVBrowse;
DATA cAlias SIZE wcol,wrow FONT feldfont DATALINK {||oVbrowse:doppelklick()}


Unfortunely I only found the following hint:
DATALINK <bDataLink> is an optional code block to evaluate whenever the user double-clicks the mouse
or presses the ENTER key within the browse area. The browse object is passed as a parameter to the code block.

but I don't know how to use ist. :roll:

Re: exit form dcbrows-object with double click

Posted: Fri May 02, 2014 2:47 am
by Tom
Hi, Obelix.

DCBROWSE ... DATALINK should not be used. Use ITEMSELECTED instead. It should work like you want if you do this:

Code: Select all

@ ... DCBBROWSE ... ITEMSELECTED {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)}
This should exit your browse if either ENTER is pressed or a doubleclick (left mouse key) occurs.

Re: exit form dcbrows-object with double click

Posted: Fri May 02, 2014 12:21 pm
by obelix
Danke Tom :D
Precisely that what I needed, and not the first time.
Are there questions you can't bring to a successfil end ? I think, the next weeks I will try to bring you in troubles with my foolish problems.
Thanks for your help.