Solved

InputQuery Message Box List

Posted on 1998-09-07
3
252 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 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
A short film showing how OnPage and Connectwise integration works.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

929 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now