Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

InputQuery Message Box List

Posted on 1998-09-07
3
Medium Priority
?
311 Views
Last Modified: 2010-04-06
I am trying to have a message dialog query input box with a list of items to pick from, the follow code allows only one line to be displayed, cannot find out how to have a list.

begin
  dbisamtable1.CheckBrowseMode;//post all
  InputString := 'LIST'+#13#10+'PROSPECT';
  ClickedOK := InputQuery('Insert Record Category Select','Enter Category',InputString);
   if ClickedOK then
    dbisamtable1.Insert;
    dbisamtable1category.value := InputString;
   end;

Thank you.

Cordially,

JAlexander
vtcmain@pacbell.net
0
Comment
Question by:vtcmain
  • 2
3 Comments
 
LVL 3

Expert Comment

by:Matvey
ID: 1338884
InputQuery doesn't support any lists, combos - just a caption and an edit. If you want to make a sophisticated dialog, you have to put all you want on a new form, and then ShowModal it. You should put some buttons and make them to be Cancel, OK, etc. Use the ModalResult property of the buttons for that.
0
 
LVL 2

Accepted Solution

by:
kjteng earned 200 total points
ID: 1338885
You cannot use inputQuery to select a list of item. Try this:
1. Create a dialog box (a new form, let's call it dlgbox1)
2. Drop a listbox or combobox to the dlgbox1
3. Key in the possible values in the items property of listbox/combox
4. ADD THESE CODES IN YOUR MAIN FORM:
    dlgbox1.ShowModal;
    if dlgbox1.ModalResult = mrOK then
      { do whatever intended}

5. Alternatively, you may just create an onclick event for the OKbutton in dlgbox1 and do whatever you wish in the event hanlder
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1338886
Ghm...
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question