Solved

DBGrid as ListBox?

Posted on 1997-07-02
2
589 Views
Last Modified: 2010-04-06
I read the answer to the quesion answered below ( ListBox as Database Navigator ) I need to do the same thing and found javiertb and sholmes comments very useful. I have my DBGrid/Listbox all set up but here is the question I have:
- Can you get rid of the horizontal scroll bar for fields that are wider than DBGrid (just truncate the text / empty space if it's to long). If I make the DBGrid wide enough the The horizontal scroll bar will go away but then there always seems to be extra space at the bottom of the DBGrid box.
- Also, when the user uses the vertical scroll bar the item is changed i.e. If the user has the first item in the box/Grid selected and then tries to scroll down the item selection changes without the user ever doing anything besides scrolling down the grid. Can I stop this from happening.

Besides those two or three things the DBGrid works great for a navigating listbox. Could someone please let me know what I can do about this?

Thanks,
Rick S.
Rick@MessageLink.com
0
Comment
Question by:Rick_S
[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:
ronit051397 earned 50 total points
ID: 1338094
To get rid of the horizenal scrollbar, try:
  SetScrollRange(DBGrid1.Handle, SB_HORZ, 0, 0, False);
0
 

Author Comment

by:Rick_S
ID: 1338095
That didn't quit work but using it i did find info on SetScrollInfo which had info on doing the same sort of thing
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 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