Solved

Message popup over Listbox Item

Posted on 2004-09-09
2
161 Views
Last Modified: 2011-09-20
Hey,

What code would I use so when I click a button a message popped up if there was a ITEM in the listbox called "Hello"?

Cheers,

Jeremy
0
Comment
Question by:computerprogramer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
snehanshu earned 30 total points
ID: 12023905
Is this what you are looking for?

procedure TForm1.Button1Click(Sender: TObject);
begin
  If ListBox1.Items.IndexOf('Hello') > -1 then
    ShowMessage('Found')
  else
    ShowMessage('Not Found');

end;

...Shu
0
 
LVL 14

Expert Comment

by:Esopo
ID: 12033417
That, and MessageBox if you want to customize the dialog (set icon, set buttons, etc)
http://www.prestwood.com/community/delphi/info/displaythings/tsld004.htm
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

617 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