Alpha Video Training
Results 1 to 6 of 6

Thread: Is there way to do "double click" on a listbox

  1. #1
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Is there way to do "double click" on a listbox

    What is the chance to add a double click function to a list box

    I have a listbox on my form and is doing well with it
    and enjoying data populated from sql statement.

    Kind a make it behave like a regular browse.

    except, i am missing the ability to perform double click action/
    now on change, i have it populate a variable and a button on the form
    to open up a form to emulate a edit form etc

    appreciate any input,
    thanks

    ken tjia

  2. #2
    Member
    Real Name
    Dave Martens
    Join Date
    Aug 2006
    Posts
    75

    Default Re: Is there way to do "double click" on a listbox

    Hi Ken,

    I'm not sure I'm understanding what you're trying to do, but I'll give it my best shot.

    I think you want to select a SQL query from a pulldown listbox, and once selected, you want that query to be executed and the results of the query to be shown in a browse within the same form.

    Thus, one listbox selection event will select the query to run, run the query, and display the result (kind of like one-click-shopping).

    Assuming I'm understood you correctly, you can run an Xbasic or Action script based on a listbox selection change by setting the "on change" action. If the "on change" action was to get the result of the listbox selection, execute that query, and then trigger a browse result to show that result, you'd have want you wanted.

    Did that help?

    Regards,
    Dave

  3. #3
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: Is there way to do "double click" on a listbox

    thanks for the reply

    i have the listbox populated nicely already.
    i can scroll it up and down now/

    howver, i was wondering if there is a way to create a function
    to emulate "double click" action like what we enjoy on a regular browse

  4. #4
    Member
    Real Name
    Dave Martens
    Join Date
    Aug 2006
    Posts
    75

    Default Re: Is there way to do "double click" on a listbox

    Hi Ken,

    Apparently, I did understand you correctly, as both our discussions started from the point of having a populated list box.

    However, you seem to want a "doubleclick" action on a listbox item to trigger the lookup, whereas I offered a "singleclick" action on a listbox item to do that (running off the single click necessary to make the listbox selection).

    That said, I hope to get you what you want ;)

    Based on the available documentation and a short experiment on my part, it appears that doubleclick events are not supported in the GUI dialog/form builder.

    However, doubleclick events are supported in XDialog. The online documentation is excellent, but not conducive to giving you a single link for how to find the information.

    Therefore, please follow these steps to find guidance on how to do this:

    1. go to online documentation (of course)
    2. go to "Xdialog control reference"
    3. under "list box" go to "list box control syntax"
    4. under the "event" listing in green near the top, go to "event syntax"
    5. note that "dbl_click" is a supported event

    the code example on this last page shows an example of doubleclicking on a color. You should be able to modify that to meet your interests.

    If you are willing to perform the function using the single click (merely selecting) approach I describe, I believe the approach I described in my last note will work.

    Regards,
    Dave

  5. #5
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: Is there way to do "double click" on a listbox

    Yes, I know double click is supported in xdialog,
    unfortunately i am still on ordinary form with a list box

    i am often curious if some one can suggest some codes to emulate
    such action under listbox.

    i am making a browse out of listbox with data retrieve from SQL
    everything works well, except no double click hi

  6. #6
    Member
    Real Name
    Dave Martens
    Join Date
    Aug 2006
    Posts
    75

    Default Re: Is there way to do "double click" on a listbox

    OK, I assumed you'd take any solution you could get. Now, I realize you want to stay with the existing form.

    For better or worse, listbox elements (in the ordinary form you have chosen) do not even have singleclick events, much less doubleclick events.

    You presumably know this, since you know that Xdialog listboxes offer single and doubleclick events.

    Therefore, the only code that would seemingly do what you want would be code that somehow added doubleclick functionality to the listbox element available to ordinary forms. There really is no equivalent without having at least singleclick support in the listbox.

    I don't know how to do that (yet) but I hope that defining some of the intermediate steps that are needed may help someone else to show you how.

    Regards,
    Dave

Similar Threads

  1. A "Continue" for the "While" statement in XBASIC
    By brett s in forum Archived Wishlist
    Replies: 9
    Last Post: 07-13-2008, 06:02 AM
  2. Replies: 1
    Last Post: 02-02-2007, 12:07 PM
  3. "copyto" and "conditional masks"
    By martinwcole in forum Alpha Five Version 7
    Replies: 3
    Last Post: 10-23-2006, 12:41 AM
  4. Duplicating a "Parent" record complete with "Children"
    By Peterg in forum Alpha Five Version 7
    Replies: 4
    Last Post: 02-23-2006, 10:40 AM
  5. Xdialog Listbox and the "|" character
    By fairclothjd in forum Alpha Five Version 6
    Replies: 3
    Last Post: 05-17-2005, 10:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •