Skip to main content

[archive] paged list box event vs exception

  • March 27, 2009
  • 9 replies
  • 0 views

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?

9 replies

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
... or can I programmatically generate an exception to terminate the screen accept?

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
We'll what we did was to have a push putton at the bottom of the listbox
When the user clicks ok, or presses enter on the button, we quit, destroy controls and exit passing back whatever was selected in linkage.

Seems to work well for us.

Shaun

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
thanks for the reply, that would work ok but I dont have the liberty to use a pb, they have to hit enter on a highlighted LB row. I have coded a msg-validate event and within that coded an exit program - this causes the calling program to hang. A goback or stop run kills the calling program (i did not write the calling program which does not make use of exceptions, only events) :confused:

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
OK,

Here's an example of what we've done.
It means the user has to hit enter twice though, but they have the best of both then, either keyboard only or mouse - down to them.

Alternatively, could you change to a paged grid?

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
If they hit enter 2x it would be ok. I'm not allowed to use grid unfortunately. thanks for the screen shot - how did you manage to code the double enter?

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
Its just tab order together with this config file entry.
"KEYSTROKE Edit=Next Terminate=13 ^M"

Tab order is positioned so that the paged grid is tab order 1
They press enter and that takes them to the push button, pressing enter on that causes a CMD-CLICKED.
We then enquire on what they've selected on the list box and pass data back to the calling program.

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
something is wrong at our shop - the configuration TERMINATE works in my development directory, but when I move the object to another directory, it ignores the terminate

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
Sorry, don't know.

Try running a trace to see if something else is changing the config entry or if it is actually being set in the first place.

[Migrated content. Thread originally posted on 26 March 2009]

This is likely a dumb question .. my apologies in advance!
How can I create an exception with the Enter key on a paged listbox?

I have a paged list box look up program called from a main program - i am displaying records in the pgd lb and need to give the user the option to double click on a record - or hit enter on the selected record and return to the calling program. The enter option is giving me trouble - there is no exception generated for an ENTER, if I code an event and destroy the window and exit, then the accept does not terminate and the calling program is corrupted (hangs). How can I create an exception with the Enter key on a paged listbox?
thanks Shaun, I got it fixed, instead of using a PB I used the after exception. Prior to the TERMINATE cblconfig change, it would not work with the enter key, working fine now.