Solved

InputQuery Message Box List

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

12 Experts available now in Live!

Get 1:1 Help Now